Documentation
¶
Index ¶
- type CachedSyncer
- type DynamoDBStorage
- func (d *DynamoDBStorage) GetStates(ctx context.Context, syncPairs []Keys) (map[Keys]State, error)
- func (d *DynamoDBStorage) GetSync(ctx context.Context, currentTime time.Time) (map[TargetGroupARN]string, error)
- func (d *DynamoDBStorage) Store(ctx context.Context, toStore map[Keys]State) error
- func (d *DynamoDBStorage) StoreSync(ctx context.Context, toStore map[TargetGroupARN]string, expireAt time.Time) error
- type HardCodedSyncFinder
- type Keys
- type LocalSyncCache
- type State
- type Storage
- type SyncCache
- type SyncFinder
- type TagSyncFinder
- type Target
- type TargetGroupARN
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedSyncer ¶ added in v0.0.6
type CachedSyncer struct { SyncFinder SyncFinder SyncCache SyncCache Log *zapctx.Logger CacheDuration time.Duration }
func (*CachedSyncer) ToSync ¶ added in v0.0.6
func (c *CachedSyncer) ToSync(ctx context.Context) (map[TargetGroupARN]string, error)
type DynamoDBStorage ¶
type DynamoDBStorage struct { TableName string Log *zapctx.Logger Client *dynamodb.DynamoDB SyncCachePrefix string }
func (*DynamoDBStorage) GetSync ¶
func (d *DynamoDBStorage) GetSync(ctx context.Context, currentTime time.Time) (map[TargetGroupARN]string, error)
func (*DynamoDBStorage) StoreSync ¶
func (d *DynamoDBStorage) StoreSync(ctx context.Context, toStore map[TargetGroupARN]string, expireAt time.Time) error
type HardCodedSyncFinder ¶
type HardCodedSyncFinder struct { TargetGroupARN TargetGroupARN Hostname string }
func (*HardCodedSyncFinder) ToSync ¶
func (h *HardCodedSyncFinder) ToSync(_ context.Context) (map[TargetGroupARN]string, error)
type Keys ¶
type Keys struct { TargetGroupARN TargetGroupARN Hostname string }
type LocalSyncCache ¶
type LocalSyncCache struct {
// contains filtered or unexported fields
}
func (*LocalSyncCache) GetSync ¶
func (l *LocalSyncCache) GetSync(_ context.Context, currentTime time.Time) (map[TargetGroupARN]string, error)
func (*LocalSyncCache) StoreSync ¶
func (l *LocalSyncCache) StoreSync(_ context.Context, toStore map[TargetGroupARN]string, expireAt time.Time) error
type SyncFinder ¶
type SyncFinder interface { // Get the list of target groups -> hostname we should sync ToSync(ctx context.Context) (map[TargetGroupARN]string, error) }
type TagSyncFinder ¶
type TagSyncFinder struct { Client *resourcegroupstaggingapi.ResourceGroupsTaggingAPI TagKey string Log *zapctx.Logger }
func (*TagSyncFinder) ToSync ¶
func (t *TagSyncFinder) ToSync(ctx context.Context) (map[TargetGroupARN]string, error)
type TargetGroupARN ¶
type TargetGroupARN string
Click to show internal directories.
Click to hide internal directories.