Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyProvider ¶
type DummyProvider struct{}
DummyProvider is a no-op for pushing and pulling seeds
func NewDummyProvider ¶
func NewDummyProvider(config map[string]interface{}) (*DummyProvider, error)
NewDummyProvider creates a DummyProvider, ignoring config
func (*DummyProvider) FetchSeed ¶
func (d *DummyProvider) FetchSeed() (Seeds, error)
FetchSeed returns an empty list of seeds
func (*DummyProvider) PushSeed ¶
func (d *DummyProvider) PushSeed(resolver resolver.IPResolver, port string) error
PushSeed does nothing and returns no error
type ManualProvider ¶
ManualProvider always returns the same IP which was provided in config
func NewManualProvider ¶
func NewManualProvider(config map[string]interface{}) (*ManualProvider, error)
NewManualProvider creates a new manual provider
func (*ManualProvider) FetchSeed ¶
func (m *ManualProvider) FetchSeed() (Seeds, error)
FetchSeed returns the seed derived from config
func (*ManualProvider) PushSeed ¶
func (m *ManualProvider) PushSeed(resolver resolver.IPResolver, port string) error
PushSeed is a no-op for a manual provider
type Provider ¶
Provider abstracts the concept of fetching and pushing seeds, to avoid depending on the details of any one cloud or hosting platform.
type S3Provider ¶
S3Provider can retrieve a seed from an object in an S3 bucket. Required permissions for a load balancer are: GetObject, PutObject, ListBucket Required permissions for an application server are: GetObject, ListBucket Without ListBucket you'll get an AccessDenied when you try to fetch a nonexistant seed
func NewS3Provider ¶
func NewS3Provider(config map[string]interface{}) (*S3Provider, error)
NewS3Provider creates a new S3 seed provider from the given config. "availability-zone" is optional; if not given it will be deduced from instance metadata if running on EC2.
func (*S3Provider) FetchSeed ¶
func (s *S3Provider) FetchSeed() (Seeds, error)
FetchSeed makes a call to S3 to retrieve the seed for the AZ this instance is located in.
func (*S3Provider) PushSeed ¶
func (s *S3Provider) PushSeed(resolver resolver.IPResolver, port string) error
PushSeed fetches remote data, updates with local node details and then publishes the details to an S3 bucket so that future nodes can join