Documentation ¶
Overview ¶
Package common contains shared logic between docker and in-process M3 implementations.
Index ¶
- func ZapMethod(s string) zapcore.Field
- type CoordinatorClient
- func (c *CoordinatorClient) AddM3msgTopicConsumer(topicOpts resources.M3msgTopicOptions, addRequest admin.TopicAddRequest) (admin.TopicGetResponse, error)
- func (c *CoordinatorClient) AddNamespace(addRequest admin.NamespaceAddRequest) (admin.NamespaceGetResponse, error)
- func (c *CoordinatorClient) ApplyKVUpdate(update string) error
- func (c *CoordinatorClient) CreateDatabase(addRequest admin.DatabaseCreateRequest) (admin.DatabaseCreateResponse, error)
- func (c *CoordinatorClient) DeleteNamespace(namespaceID string) error
- func (c *CoordinatorClient) GetM3msgTopic(topicOpts resources.M3msgTopicOptions) (admin.TopicGetResponse, error)
- func (c *CoordinatorClient) GetNamespace() (admin.NamespaceGetResponse, error)
- func (c *CoordinatorClient) GetPlacement(opts resources.PlacementRequestOptions) (admin.PlacementGetResponse, error)
- func (c *CoordinatorClient) InitM3msgTopic(topicOpts resources.M3msgTopicOptions, initRequest admin.TopicInitRequest) (admin.TopicGetResponse, error)
- func (c *CoordinatorClient) InitPlacement(opts resources.PlacementRequestOptions, initRequest admin.PlacementInitRequest) (admin.PlacementGetResponse, error)
- func (c *CoordinatorClient) RunQuery(verifier resources.ResponseVerifier, query string, headers map[string][]string) error
- func (c *CoordinatorClient) UpdateNamespace(req admin.NamespaceUpdateRequest) (admin.NamespaceGetResponse, error)
- func (c *CoordinatorClient) WaitForInstances(ids []string) error
- func (c *CoordinatorClient) WaitForNamespace(name string) error
- func (c *CoordinatorClient) WaitForShardsReady() error
- func (c *CoordinatorClient) WriteCarbon(url string, metric string, v float64, t time.Time) error
- func (c *CoordinatorClient) WriteProm(name string, tags map[string]string, samples []prompb.Sample) error
- type CoordinatorClientOptions
- type RetryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CoordinatorClient ¶
type CoordinatorClient struct {
// contains filtered or unexported fields
}
CoordinatorClient is a client use to invoke API calls on a coordinator
func NewCoordinatorClient ¶
func NewCoordinatorClient(opts CoordinatorClientOptions) CoordinatorClient
NewCoordinatorClient creates a new CoordinatorClient.
func (*CoordinatorClient) AddM3msgTopicConsumer ¶
func (c *CoordinatorClient) AddM3msgTopicConsumer( topicOpts resources.M3msgTopicOptions, addRequest admin.TopicAddRequest, ) (admin.TopicGetResponse, error)
AddM3msgTopicConsumer adds a consumer service to an m3msg topic
func (*CoordinatorClient) AddNamespace ¶
func (c *CoordinatorClient) AddNamespace( addRequest admin.NamespaceAddRequest, ) (admin.NamespaceGetResponse, error)
AddNamespace adds a namespace.
func (*CoordinatorClient) ApplyKVUpdate ¶
func (c *CoordinatorClient) ApplyKVUpdate(update string) error
ApplyKVUpdate applies a KV update.
func (*CoordinatorClient) CreateDatabase ¶
func (c *CoordinatorClient) CreateDatabase( addRequest admin.DatabaseCreateRequest, ) (admin.DatabaseCreateResponse, error)
CreateDatabase creates a database.
func (*CoordinatorClient) DeleteNamespace ¶
func (c *CoordinatorClient) DeleteNamespace(namespaceID string) error
DeleteNamespace removes the namespace.
func (*CoordinatorClient) GetM3msgTopic ¶
func (c *CoordinatorClient) GetM3msgTopic( topicOpts resources.M3msgTopicOptions, ) (admin.TopicGetResponse, error)
GetM3msgTopic fetches an m3msg topic
func (*CoordinatorClient) GetNamespace ¶
func (c *CoordinatorClient) GetNamespace() (admin.NamespaceGetResponse, error)
GetNamespace gets namespaces.
func (*CoordinatorClient) GetPlacement ¶
func (c *CoordinatorClient) GetPlacement(opts resources.PlacementRequestOptions) (admin.PlacementGetResponse, error)
GetPlacement gets placements.
func (*CoordinatorClient) InitM3msgTopic ¶
func (c *CoordinatorClient) InitM3msgTopic( topicOpts resources.M3msgTopicOptions, initRequest admin.TopicInitRequest, ) (admin.TopicGetResponse, error)
InitM3msgTopic initializes an m3msg topic
func (*CoordinatorClient) InitPlacement ¶
func (c *CoordinatorClient) InitPlacement( opts resources.PlacementRequestOptions, initRequest admin.PlacementInitRequest, ) (admin.PlacementGetResponse, error)
InitPlacement initializes placements.
func (*CoordinatorClient) RunQuery ¶
func (c *CoordinatorClient) RunQuery( verifier resources.ResponseVerifier, query string, headers map[string][]string, ) error
RunQuery runs the given query with a given verification function.
func (*CoordinatorClient) UpdateNamespace ¶
func (c *CoordinatorClient) UpdateNamespace( req admin.NamespaceUpdateRequest, ) (admin.NamespaceGetResponse, error)
UpdateNamespace updates the namespace.
func (*CoordinatorClient) WaitForInstances ¶
func (c *CoordinatorClient) WaitForInstances( ids []string, ) error
WaitForInstances blocks until the given instance is available.
func (*CoordinatorClient) WaitForNamespace ¶
func (c *CoordinatorClient) WaitForNamespace(name string) error
WaitForNamespace blocks until the given namespace is enabled. NB: if the name string is empty, this will instead check for a successful response.
func (*CoordinatorClient) WaitForShardsReady ¶
func (c *CoordinatorClient) WaitForShardsReady() error
WaitForShardsReady waits until all shards gets ready.
func (*CoordinatorClient) WriteCarbon ¶
WriteCarbon writes a carbon metric datapoint at a given time.