blueprint

package
v0.0.0-...-b3895e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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 New

func New(host string) Client

New returns a new Blueprint Client

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL