control

package
v0.1.56 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommandBatch

func NewCommandBatch() icontrol.Batch

Types

type CommandBatch

type CommandBatch struct {
	ID        uuid.UUID          `json:"id"`
	Timestamp time.Time          `json:"timestamp"`
	Commands  []icontrol.Command `json:"-"`
	RawCmds   []json.RawMessage  `json:"commands"`
	NodeID    uint64             `json:"nodeID"`
}

func (*CommandBatch) AddCommand

func (b *CommandBatch) AddCommand(cmd icontrol.Command)

func (*CommandBatch) Apply

func (b *CommandBatch) Apply(ctx context.Context, cli *client.Client) (*iresponse.Response, error)

func (*CommandBatch) GetCommand

func (b *CommandBatch) GetCommand(name string) (icontrol.Command, error)

func (*CommandBatch) GetCommands

func (b *CommandBatch) GetCommands() []icontrol.Command

func (*CommandBatch) GetNodeID

func (b *CommandBatch) GetNodeID() uint64

func (*CommandBatch) MarshalJSON

func (b *CommandBatch) MarshalJSON() ([]byte, error)

func (*CommandBatch) Put

func (b *CommandBatch) Put(ctx context.Context, client *clientv3.Client) error

func (*CommandBatch) SetNodeID

func (b *CommandBatch) SetNodeID(nodeID uint64)

func (*CommandBatch) UnmarshalJSON

func (b *CommandBatch) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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