Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64CommandId ¶
Int64CommandId creates a command id from int64. Useful to use values like Generation as command id
func ParseAsyncCommandResult ¶
Types ¶
type AsyncCommand ¶
type AsyncCommand interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler SerializedId() []byte }
AsyncCommand represents an interface of an asynchronous command containing an id. This type is used in order to automatically correlate commands and their results based on the id.
type AsyncCommandResult ¶
type AsyncCommandResult struct { // CommandId is the command id CommandId []byte // Error is the eventual error string. Empty if no error happened Error string }
AsyncCommandResult is a data structure representing an asynchronous command result. This can be used in use cases where the controller sends a command, which is acked as soon as is received by the data plane, then the data plane performs an eventually long operation, and when this operation is completed this result is sent back to the control plane. This can be used in conjunction with reconciler.AsyncCommandNotificationStore.
func (AsyncCommandResult) IsFailed ¶
func (k AsyncCommandResult) IsFailed() bool
IsFailed returns true if this result contains an error
func (AsyncCommandResult) MarshalBinary ¶
func (k AsyncCommandResult) MarshalBinary() (data []byte, err error)
func (*AsyncCommandResult) UnmarshalBinary ¶
func (k *AsyncCommandResult) UnmarshalBinary(data []byte) error