command

package
v0.0.0-...-6c03031 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WriteCommand

type WriteCommand struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

This command writes a value to a key.

func NewWriteCommand

func NewWriteCommand(key string, value string) *WriteCommand

Creates a new write command.

func (*WriteCommand) Apply

func (c *WriteCommand) Apply(server raft.Server) (interface{}, error)

Writes a value to a key.

func (*WriteCommand) CommandName

func (c *WriteCommand) CommandName() string

The name of the command in the log.

Jump to

Keyboard shortcuts

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