Documentation ¶
Index ¶
- type Client
- type ConfigFetcher
- type MetadataLoader
- func (d *MetadataLoader) Close()
- func (d *MetadataLoader) Crank()
- func (d *MetadataLoader) ForceReload()
- func (d *MetadataLoader) GetAllMetadata() scoop_protocol.EventMetadataConfig
- func (d *MetadataLoader) GetMetadataValueByType(eventName string, metadataType string) string
- func (d *MetadataLoader) LoadIntoAce(eventName string) bool
- func (d *MetadataLoader) TableExists(eventName string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an client for the http interface of blueprint
func (*Client) GetMigration ¶
func (c *Client) GetMigration(table string, toVersion int) ( []scoop_protocol.Operation, []scoop_protocol.ColumnDefinition, error)
GetMigration hits blueprint's migration endpoint for finding how to migrate to `toVersion` for table `table`
type ConfigFetcher ¶
type ConfigFetcher interface {
Fetch() (io.ReadCloser, error)
}
ConfigFetcher is responsible for obtaining configs from Blueprint
func NewFetcher ¶
func NewFetcher(bucket, key string, s3 s3iface.S3API) ConfigFetcher
NewFetcher returns a ConfigFetcher that reads configs from the given S3 bucket and key
type MetadataLoader ¶
type MetadataLoader struct {
// contains filtered or unexported fields
}
MetadataLoader fetches configs on an interval, with stats on the fetching process
func NewMetadataLoader ¶
func NewMetadataLoader( fetcher ConfigFetcher, reloadTime time.Duration, retryDelay time.Duration, stats monitoring.SafeStatter, ) (*MetadataLoader, error)
NewMetadataLoader returns a new MetadataLoader, performing the first fetch
func (*MetadataLoader) Close ¶
func (d *MetadataLoader) Close()
Close stops the MetadataLoader's fetching process.
func (*MetadataLoader) Crank ¶
func (d *MetadataLoader) Crank()
Crank is a blocking function that refreshes the config on an interval.
func (*MetadataLoader) ForceReload ¶
func (d *MetadataLoader) ForceReload()
ForceReload forces the metadata loader to load metadata right away
func (*MetadataLoader) GetAllMetadata ¶
func (d *MetadataLoader) GetAllMetadata() scoop_protocol.EventMetadataConfig
GetAllMetadata returns all metadata
func (*MetadataLoader) GetMetadataValueByType ¶
func (d *MetadataLoader) GetMetadataValueByType(eventName string, metadataType string) string
GetMetadataValueByType returns the metadata value given an eventName and metadataType
func (*MetadataLoader) LoadIntoAce ¶
func (d *MetadataLoader) LoadIntoAce(eventName string) bool
LoadIntoAce returns whether an event is to be loaded into Ace based on the metadata
func (*MetadataLoader) TableExists ¶
func (d *MetadataLoader) TableExists(eventName string) bool
TableExists returns if an event exists in the metadata