operations

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package operations provides interaction with EventStoreDb admin operations. Before accessing streams a grpc connection needs to be established with EventStore through github.com/pivonroll/EventStore-Client-Go/core/connection package.

Index

Constants

View Source
const (
	StartScavenge_ThreadCountLessOrEqualZeroErr errors.ErrorCode = "StartScavenge_ThreadCountLessOrEqualZeroErr"
	StartScavenge_StartFromChunkLessThanZeroErr errors.ErrorCode = "StartScavenge_StartFromChunkLessThanZeroErr"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client provides interaction with admin operations at EvenStoreDB.

func NewClient added in v0.11.0

func NewClient(grpcClient connection.GrpcClient) *Client

NewClient creates a new client which interacts with admin operations at EventStoreDB.

func (*Client) MergeIndexes added in v0.11.0

func (client *Client) MergeIndexes(ctx context.Context) errors.Error

MergeIndexes initiates an index merge operation.

func (*Client) ResignNode added in v0.11.0

func (client *Client) ResignNode(ctx context.Context) errors.Error

ResignNode resigns a node.

func (*Client) RestartPersistentSubscriptions added in v0.11.0

func (client *Client) RestartPersistentSubscriptions(ctx context.Context) errors.Error

RestartPersistentSubscriptions restart persistent subscriptions

func (*Client) SetNodePriority added in v0.11.0

func (client *Client) SetNodePriority(ctx context.Context, priority int32) errors.Error

SetNodePriority sets the node priority.

func (*Client) Shutdown added in v0.11.0

func (client *Client) Shutdown(ctx context.Context) errors.Error

Shutdown shuts down the EventStoreDB node.

func (*Client) StartScavenge added in v0.11.0

func (client *Client) StartScavenge(ctx context.Context,
	request StartScavengeRequest) (ScavengeResponse, errors.Error)

StartScavenge starts a scavenge operation.

func (*Client) StopScavenge added in v0.11.0

func (client *Client) StopScavenge(ctx context.Context,
	scavengeId string) (ScavengeResponse, errors.Error)

StopScavenge stops a scavenge operation.

type ScavengeResponse

type ScavengeResponse struct {
	ScavengeId string         // ID of the scavenge operations
	Status     ScavengeStatus // Status of the operation
}

ScavengeResponse is a result received when scavenge operation is started and stopped.

type ScavengeStatus

type ScavengeStatus int32

ScavengeStatus is a status of the scavenge operation.

const (
	// ScavengeStatus_Started scavenge operation is started
	ScavengeStatus_Started ScavengeStatus = 0
	// ScavengeStatus_InProgress scavenge operation is in progress
	ScavengeStatus_InProgress ScavengeStatus = 1
	// ScavengeStatus_Stopped scavenge operation is stopped
	ScavengeStatus_Stopped ScavengeStatus = 2
)

type StartScavengeRequest

type StartScavengeRequest struct {
	ThreadCount    int32
	StartFromChunk int32
}

StartScavengeRequest are set of options which can be set for a scavenge operation.

Directories

Path Synopsis
internal
grpc_operations_client
Package grpc_operations_client is a generated GoMock package.
Package grpc_operations_client is a generated GoMock package.

Jump to

Keyboard shortcuts

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