mode

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode uint32

Mode represents enumeration of Shard work modes.

const (
	// ReadWrite is a Mode value for shard that is available
	// for read and write operations. Default shard mode.
	ReadWrite Mode = 0

	// DegradedReadOnly is a Mode value for shard that is set automatically
	// after a certain number of errors is encountered. It is the same as
	// `mode.Degraded` but also is read-only.
	DegradedReadOnly = Degraded | ReadOnly
)
const (
	// ReadOnly is a Mode value for shard that does not
	// accept write operation but is readable.
	ReadOnly Mode = 1 << iota

	// Degraded is a Mode value for shard when the metabase is unavailable.
	// It is hard to perform some modifying operations in this mode, thus it can only be set by an administrator.
	Degraded
)

func (Mode) NoMetabase

func (m Mode) NoMetabase() bool

NoMetabase returns true iff m is operating without the metabase.

func (Mode) ReadOnly

func (m Mode) ReadOnly() bool

ReadOnly returns true iff m prohibits modifying operations with shard.

func (Mode) String

func (m Mode) String() string

Jump to

Keyboard shortcuts

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