Documentation
¶
Index ¶
- func NewCommandBatch() icontrol.Batch
- type CommandBatch
- func (b *CommandBatch) AddCommand(cmd icontrol.Command)
- func (b *CommandBatch) Apply(ctx context.Context, cli *client.Client) (*iresponse.Response, error)
- func (b *CommandBatch) GetCommand(name string) (icontrol.Command, error)
- func (b *CommandBatch) GetCommands() []icontrol.Command
- func (b *CommandBatch) GetNodeID() uint64
- func (b *CommandBatch) MarshalJSON() ([]byte, error)
- func (b *CommandBatch) Put(ctx context.Context, client *clientv3.Client) error
- func (b *CommandBatch) SetNodeID(nodeID uint64)
- func (b *CommandBatch) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommandBatch ¶
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) 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) SetNodeID ¶
func (b *CommandBatch) SetNodeID(nodeID uint64)
func (*CommandBatch) UnmarshalJSON ¶
func (b *CommandBatch) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.