registration

package
v0.9.6-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled       bool          `toml:"enabled"`
	URL           string        `toml:"url"`
	Token         string        `toml:"token"`
	StatsInterval toml.Duration `toml:"stats-interval"`
}

Config represents the configuration for the registration service.

func NewConfig

func NewConfig() Config

NewConfig returns an instance of Config with defaults.

type Service

type Service struct {
	MetaStore interface {
		ClusterID() (uint64, error)
		NodeID() uint64
	}
	Monitor interface {
		Statistics(tags map[string]string) ([]*monitor.Statistic, error)
		RegisterDiagnosticsClient(name string, client monitor.DiagsClient)
	}
	// contains filtered or unexported fields
}

Service represents the registration service.

func NewService

func NewService(c Config, version string) (*Service, error)

NewService returns a configured registration service.

func (*Service) Close

func (s *Service) Close() error

Close stops retention policy enforcement.

func (*Service) Diagnostics

func (s *Service) Diagnostics() (*monitor.Diagnostic, error)

Diagnostics returns diagnostics information.

func (*Service) Open

func (s *Service) Open() error

Open starts retention policy enforcement.

func (*Service) SetLogger added in v0.9.6

func (s *Service) SetLogger(l *log.Logger)

SetLogger sets the internal logger to the logger passed in.

Jump to

Keyboard shortcuts

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