Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CAS(ctx context.Context, key string, ...) error
- func (c *Client) Delete(ctx context.Context, key string) error
- func (c *Client) Get(ctx context.Context, key string) (any, error)
- func (c *Client) LastUpdateTime(key string) time.Time
- func (c *Client) List(ctx context.Context, key string) ([]string, error)
- func (c *Client) WatchKey(ctx context.Context, key string, f func(any) bool)
- func (c *Client) WatchPrefix(ctx context.Context, prefix string, f func(string, any) bool)
- type Config
Constants ¶
View Source
const ( // DdbBatchSizeLimit Current limit of 25 actions per batch // https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html DdbBatchSizeLimit = 25 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg Config, cc codec.Codec, logger log.Logger, registerer prometheus.Registerer) (*Client, error)
type Config ¶
type Config struct {
Region string `yaml:"region"`
TableName string `yaml:"table_name"`
TTL time.Duration `yaml:"ttl"`
PullerSyncTime time.Duration `yaml:"puller_sync_time"`
MaxCasRetries int `yaml:"max_cas_retries"`
Timeout time.Duration `yaml:"timeout"`
}
Config to create a ConsulClient
Click to show internal directories.
Click to hide internal directories.