Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetRequest ¶
GetRequest is the object describing a request to get configuration.
type GetResponse ¶
type GetResponse struct {
Items []*Item `json:"items"`
}
GetResponse is the request object for getting configuration.
type Item ¶
type Item struct { Key string `json:"key"` Value string `json:"value,omitempty"` Version string `json:"version,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` }
Item represents a configuration item with name, content and other information.
type Store ¶
type Store interface { // Init configuration store. Init(metadata Metadata) error // Get configuration. Get(ctx context.Context, req *GetRequest) (*GetResponse, error) // Subscribe configuration by update event. Subscribe(ctx context.Context, req *SubscribeRequest, handler UpdateHandler) (string, error) // Unsubscribe configuration with keys Unsubscribe(ctx context.Context, req *UnsubscribeRequest) error }
Store is an interface to perform operations on store.
type SubscribeRequest ¶
type SubscribeRequest struct { Keys []string `json:"keys"` Metadata map[string]string `json:"metadata"` }
SubscribeRequest is the object describing a request to subscribe configuration.
type UnsubscribeRequest ¶ added in v1.7.0
type UnsubscribeRequest struct {
ID string `json:"id"`
}
UnsubscribeRequest is the object describing a request to unsubscribe configuration.
type UpdateEvent ¶
UpdateEvent is the object describing a configuration update event.
type UpdateHandler ¶
type UpdateHandler func(ctx context.Context, e *UpdateEvent) error
UpdateHandler is the handler used to send event to daprd.
Click to show internal directories.
Click to hide internal directories.