snapshotter

package
v0.13.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2016 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MuxHeader is the header byte used for the TCP muxer.
	MuxHeader = 3

	// BackupMagicHeader is the first 8 bytes used to identify and validate
	// a metastore backup file
	BackupMagicHeader = 0x59590101
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.12.0

type Client struct {
	// contains filtered or unexported fields
}

Client provides an API for the snapshotter service.

func NewClient added in v0.12.0

func NewClient(host string) *Client

NewClient returns a new *Client.

func (*Client) MetastoreBackup added in v0.12.0

func (c *Client) MetastoreBackup() (*meta.Data, error)

MetastoreBackup returns a snapshot of the meta store.

type Request added in v0.10.0

type Request struct {
	Type            RequestType
	Database        string
	RetentionPolicy string
	ShardID         uint64
	Since           time.Time
}

Request represents a request for a specific backup or for information about the shards on this server for a database or retention policy

type RequestType added in v0.10.0

type RequestType uint8
const (
	RequestShardBackup RequestType = iota
	RequestMetastoreBackup
	RequestDatabaseInfo
	RequestRetentionPolicyInfo
)

type Response added in v0.10.0

type Response struct {
	Paths []string
}

Response contains the relative paths for all the shards on this server that are in the requested database or retention policy

type Service

type Service struct {
	Node *influxdb.Node

	MetaClient interface {
		encoding.BinaryMarshaler
		Database(name string) *meta.DatabaseInfo
	}

	TSDBStore *tsdb.Store

	Listener net.Listener
	Logger   *log.Logger
	// contains filtered or unexported fields
}

Service manages the listener for the snapshot endpoint.

func NewService

func NewService() *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

Close implements the Service interface.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal out-of-band errors.

func (*Service) Open

func (s *Service) Open() error

Open starts the service.

func (*Service) SetLogOutput added in v0.13.0

func (s *Service) SetLogOutput(w io.Writer)

SetLogOutput sets the writer to which all logs are written. It must not be called after Open is called.

Jump to

Keyboard shortcuts

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