backend

package
Version: v5.10.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: MIT, MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEtcdName is the default etcd member node name (single-node cluster only)
	DefaultEtcdName = "default"

	// DefaultEtcdClientURL is the default URL to listen for Etcd clients
	DefaultEtcdClientURL = "http://127.0.0.1:2379"

	// DefaultEtcdPeerURL is the default URL to listen for Etcd peers (single-node cluster only)
	DefaultEtcdPeerURL = "http://127.0.0.1:2380"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Client     *clientv3.Client
	Daemons    []daemon.Daemon
	Etcd       *etcd.Etcd
	Store      store.Store
	EventStore EventStoreUpdater
	// contains filtered or unexported fields
}

Backend represents the backend server, which is used to hold the datastore and coordinating the daemons

func Initialize

func Initialize(config *Config) (*Backend, error)

Initialize instantiates a Backend struct with the provided config, by configuring etcd and establishing a list of daemons, which constitute our backend. The daemons will later be started according to their position in the b.Daemons list, and stopped in reverse order

func (*Backend) Run

func (b *Backend) Run() error

Run starts all of the Backend server's daemons

func (*Backend) Stop

func (b *Backend) Stop()

Stop the Backend cleanly.

type Config

type Config struct {
	// Backend Configuration
	StateDir string
	CacheDir string

	// Agentd Configuration
	AgentHost string
	AgentPort int

	// Apid Configuration
	APIListenAddress string
	APIURL           string

	// Dashboardd Configuration
	DashboardHost        string
	DashboardPort        int
	DashboardTLSCertFile string
	DashboardTLSKeyFile  string

	// Pipelined Configuration
	DeregistrationHandler string

	// Etcd configuration
	EtcdAdvertiseClientURLs      []string
	EtcdInitialAdvertisePeerURLs []string
	EtcdInitialClusterToken      string
	EtcdInitialClusterState      string
	EtcdInitialCluster           string
	EtcdListenClientURLs         []string
	EtcdListenPeerURLs           []string
	EtcdName                     string
	NoEmbedEtcd                  bool

	// Etcd TLS configuration
	EtcdClientTLSInfo     etcd.TLSInfo
	EtcdPeerTLSInfo       etcd.TLSInfo
	EtcdCipherSuites      []string
	EtcdMaxRequestBytes   uint
	EtcdQuotaBackendBytes int64

	TLS *types.TLSOptions
}

Config specifies a Backend configuration.

type EventStoreUpdater

type EventStoreUpdater interface {
	UpdateEventStore(to store.EventStore)
}

EventStoreUpdater offers a way to update an event store to a different implementation in-place.

Directories

Path Synopsis
jwt
Package etcd manages the embedded etcd server that Sensu uses for storing state consistently across sensu-backend processes.
Package etcd manages the embedded etcd server that Sensu uses for storing state consistently across sensu-backend processes.
Package messaging provides the means of coordination between the different components of the Sensu backend.
Package messaging provides the means of coordination between the different components of the Sensu backend.
Package pipelined provides the traditional Sensu event pipeline.
Package pipelined provides the traditional Sensu event pipeline.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto