Documentation ¶
Index ¶
- type ClusterInfo
- type Option
- func WithApiSecret(secret string) Option
- func WithBucketSize(buckets int) Option
- func WithClock(clock clock.Clock) Option
- func WithClusterName(name string) Option
- func WithGcGrace(gcgrace int) Option
- func WithGcInterval(gcinterval int) Option
- func WithHostName(hostName string) Option
- func WithHttpPort(port string) Option
- func WithNodeId(nodeId string) Option
- func WithRingpop(ringpop *ringpop.Ringpop) Option
- func WithSeed(seeds string) Option
- func WithStatDEnabled(enable bool) Option
- func WithStatsDBucket(bucket string) Option
- func WithStatsDHostPort(hostport string) Option
- func WithStatsDSampleRate(rate float32) Option
- func WithSyncBuffer(bufferSize int) Option
- func WithTChannel(tchannel *tchannel.Channel) Option
- func WithTChannelPort(port string) Option
- func WithUnsyncedCtrLimit(limit int32) Option
- func WithUnsyncedTimeLimit(limit int) Option
- type RateConfig
- type Store
- func (s *Store) Close()
- func (cs *Store) GetClusterInfo() *ClusterInfo
- func (s *Store) GetRateConfig(key string) *RateConfig
- func (s *Store) GetRateConfigAll() map[string]*RateConfig
- func (s *Store) Handle(e event.Event)
- func (cs *Store) HandleEvent(event events.Event)
- func (s *Store) Incr(key string, count int32, threshold int32, window int32, peakaveraged bool) bool
- func (cs *Store) IncrAction(ctx thrift.Context, key string, count int32, threshold int32, window int32, ...) (bool, error)
- func (s *Store) IsAuthorised(secret string) bool
- func (s *Store) LoadRateConfig()
- func (s *Store) RateLimitGlobal(key string, count int32) bool
- func (cs *Store) RateLimitGlobalAction(ctx thrift.Context, key string, count int32) (bool, error)
- func (s *Store) SaveRateConfig()
- func (cs *Store) SendSyncRateConfigToNode(node string, key string, rateConfig *RateConfig) error
- func (cs *Store) SendSyncToNode(node string, syncs []*com.SyncCommand) error
- func (s *Store) SetRateConfig(key string, rateConfig RateConfig)
- func (s *Store) StatsDClient() *statsd.Client
- func (s *Store) SyncKeys(ctx thrift.Context, syncs []*com.SyncCommand) error
- func (cs *Store) SyncRateConfig(ctx thrift.Context, key string, threshold int32, window int32, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterInfo ¶
type Option ¶
type Option func(*options)
func WithApiSecret ¶
func WithBucketSize ¶
func WithClusterName ¶
func WithGcGrace ¶
func WithGcInterval ¶
func WithHostName ¶
func WithHttpPort ¶
func WithNodeId ¶
func WithRingpop ¶
func WithRingpop(ringpop *ringpop.Ringpop) Option
func WithStatDEnabled ¶
func WithStatsDBucket ¶
func WithStatsDHostPort ¶
func WithStatsDSampleRate ¶
func WithSyncBuffer ¶
func WithTChannel ¶
func WithTChannel(tchannel *tchannel.Channel) Option
func WithTChannelPort ¶
func WithUnsyncedCtrLimit ¶
func WithUnsyncedTimeLimit ¶
type RateConfig ¶
type Store ¶
func (*Store) GetClusterInfo ¶
func (cs *Store) GetClusterInfo() *ClusterInfo
func (*Store) GetRateConfig ¶
func (s *Store) GetRateConfig(key string) *RateConfig
func (*Store) GetRateConfigAll ¶
func (s *Store) GetRateConfigAll() map[string]*RateConfig
func (*Store) HandleEvent ¶
func (*Store) IncrAction ¶
func (*Store) IsAuthorised ¶
func (*Store) LoadRateConfig ¶
func (s *Store) LoadRateConfig()
func (*Store) RateLimitGlobalAction ¶
func (*Store) SaveRateConfig ¶
func (s *Store) SaveRateConfig()
func (*Store) SendSyncRateConfigToNode ¶
func (cs *Store) SendSyncRateConfigToNode(node string, key string, rateConfig *RateConfig) error
func (*Store) SendSyncToNode ¶
func (cs *Store) SendSyncToNode(node string, syncs []*com.SyncCommand) error
func (*Store) SetRateConfig ¶
func (s *Store) SetRateConfig(key string, rateConfig RateConfig)
func (*Store) StatsDClient ¶
func (s *Store) StatsDClient() *statsd.Client
Click to show internal directories.
Click to hide internal directories.