node

package
v0.0.0-...-ba27772 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	DrainBeforeShutdown bool
	// contains filtered or unexported fields
}

func New

func New(addrLis, addrPub string, drainBeforeShutdown bool, logReqs bool, chaos bool) (*Node, error)

func (*Node) Activate

func (n *Node) Activate(rID api.RangeID) error

Activate:

func (*Node) Deactivate

func (n *Node) Deactivate(rID api.RangeID) error

Deactivate: Disable writes to the range, because we're about to move it and I don't have the time to implement something better today. In this example, keys are writable on exactly one node. (Or zero, during failures!)

func (*Node) DrainRanges

func (n *Node) DrainRanges()

TODO: Move this to rangelet?

func (*Node) Drop

func (n *Node) Drop(rID api.RangeID) error

Drop: Discard the range.

func (*Node) GetLoadInfo

func (n *Node) GetLoadInfo(rID api.RangeID) (api.LoadInfo, error)

func (*Node) Prepare

func (n *Node) Prepare(rm api.Meta, parents []api.Parent) error

Prepare: Create the range, but don't do anything with it yet.

func (*Node) Run

func (n *Node) Run(ctx context.Context) error

type Range

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

Jump to

Keyboard shortcuts

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