server

package
v0.0.0-...-b911265 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EsSidecarServer

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

EsSidecarServer is the interface to this component.

func NewEsSidecarServer

func NewEsSidecarServer(es *elastic.Elastic, bc *elastic.BackupsConfig) *EsSidecarServer

NewEsSidecarServer creates a new EsSidecarServer instance.

func (*EsSidecarServer) ConvergeRepositorySettings

ConvergeRepositorySettings updates settings such as backup/restore throttle settings on an existing repository. Elasticsearch's APIs don't distinguish between create/update so the underlying implementation does not either, i.e., there is no error when updating a repo that doesn't exist, it gets created instead

func (*EsSidecarServer) CreateRepository

CreateRepository creates a snapshot repository for the service specified in the request. This API is exposed for expert use; end-user backups should only need to request a snapshot and let the repo be created implicitly.

func (*EsSidecarServer) CreateSnapshot

CreateSnapshot creates an Es snapshot for the service specified in the request. The repository type and settings are specified by the backupsConfig set on the server. The repository will be created/updated as necessary prior to the actual snapshot creation.

func (*EsSidecarServer) CreateSnapshotStatus

CreateSnapshotStatus gives the status of snapshot creation

func (*EsSidecarServer) DeleteSnapshot

func (*EsSidecarServer) PurgeDocumentsFromIndexByAge

func (server *EsSidecarServer) PurgeDocumentsFromIndexByAge(ctx context.Context, in *api.PurgeRequest) (*api.PurgeResponse, error)

PurgeDocumentsFromIndexByAge deletes all documents containing a date-mapped field "end_time" older than in.OlderThanDays from in.Index.

func (*EsSidecarServer) PurgeTimeSeriesIndicesByAge

func (server *EsSidecarServer) PurgeTimeSeriesIndicesByAge(ctx context.Context, in *api.PurgeRequest) (*api.PurgeResponse, error)

PurgeTimeSeriesIndicesByAge deletes indexes in the form basename-YYYY-mm-dd older than the requested number of days.

func (*EsSidecarServer) RemoveRepository

RemoveRepository deletes the snapshot repository for the given service

func (*EsSidecarServer) RestoreSnapshot

RestoreSnapshot initiates the restore of an Es snapshot for the service specified in the request. The repository type and settings are specified by the backupsConfig set on the server.

func (*EsSidecarServer) RestoreSnapshotStatus

RestoreSnapshotStatus gives the status of snapshot restore

func (*EsSidecarServer) Version

func (server *EsSidecarServer) Version(ctx context.Context, request *empty.Empty) (*api.VersionResponse, error)

Version returns the Version of the ES Sidecar Service

type Watcher

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

Watcher is the interface to this component.

func NewWatcher

func NewWatcher(checkInterval time.Duration, warning int64, critical int64, esURL string) (*Watcher, error)

NewWatcher creates a new Watcher struct using the provided configuration

func (*Watcher) Watch

func (watcher *Watcher) Watch()

Watch begins polling ES at a configured interval to report on disk usage stats. It logs errors when disk space of any mount point on any node falls below the warning threshold; and logs errors when it falls below the critical threshold.

Jump to

Keyboard shortcuts

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