Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get user counters 32 or 64 #2

Open
aveyrenc opened this issue May 5, 2020 · 0 comments
Open

Can't get user counters 32 or 64 #2

aveyrenc opened this issue May 5, 2020 · 0 comments

Comments

@aveyrenc
Copy link

aveyrenc commented May 5, 2020

Hello

I can't get user counters 32 or 64 because the API's response doesn't match ExtrasUserCounters32Statistics or ExtrasUserCounters64Statistics Go structure.

Here is an example response of a call to /api/tm/6.1/status/local_tm/statistics/extras/user_counters_32:

{'statistics': {'counter1': 47,
                'counter10': 0,
                'counter2': 0,
                'counter3': 0,
                'counter4': 0,
                'counter5': 0,
                'counter6': 0,
                'counter7': 0,
                'counter8': 0,
                'counter9': 0}}

As you can see, the content of statistics is a map of counter names to integers.

Currently, the Go definition of the structure is:

	Statistics struct {
		Counter *int `json:"counter"`
	} `json:"statistics"`

It doesn't capture any of the user counters 32 or 64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant