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

add CreateMetricStore #165

Merged
merged 3 commits into from
Jun 20, 2022
Merged

add CreateMetricStore #165

merged 3 commits into from
Jun 20, 2022

Conversation

chaolee50
Copy link

No description provided.


// CreateMetricStore .
func (c *Client) CreateMetricStore(project, name string, ttl, shard int) error {
logStore := &LogStore{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

让用户自己填入LogStore的配置,然后这边强制把Type设置成Metrics

}

// UpdateMetricStore .
func (c *Client) UpdateMetricStore(project, name string, ttl int) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样的道理,传入LogStore,然后再强制设置Type为Metrics,最后调用UpdateSubStoreTTL

import "time"

// CreateMetricStore .
func (c *Client) CreateMetricStore(project, name string, ttl, shard int) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要给ClientInterface加上接口,然后再TokenUpdateClient上也加上对应的实现

https://github.com/aliyun/aliyun-log-go-sdk/blob/master/client_interface.go

@shabicheng
Copy link
Collaborator

/LGTM

@shabicheng shabicheng merged commit 4385247 into aliyun:master Jun 20, 2022
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

Successfully merging this pull request may close these issues.

2 participants