messaging

package
v0.0.57 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgPropTimestamp = "timestamp"
	// MsgPropCluster is the property name for the cluster name
	MsgPropCluster = "cluster"
	// MsgPropAccount is the property name for the account name
	MsgPropAccount = "account"
	// MsgPropEvent is the property name for the event type
	MsgPropEvent                                  = "event"
	MsgPropEventValueGetObjectMessage             = "GetObject"
	MsgPropEventValuePatchObjectMessage           = "PatchObject"
	MsgPropEventValueVerifyObjectMessage          = "VerifyObject"
	MsgPropEventValueDeleteObjectMessage          = "DeleteObject"
	MsgPropEventValuePutObjectMessage             = "PutObject"
	MsgPropEventValueServerConnectedMessage       = "ServerConnected"
	MsgPropEventValueReconciliationRequestMessage = "ReconciliationRequest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteObjectMessage

type DeleteObjectMessage struct {
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	ResourceVersion int    `json:"resourceVersion"`
}

type GetObjectMessage

type GetObjectMessage struct {
	BaseObject      []byte `json:"baseObject"`
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	ResourceVersion int    `json:"resourceVersion"`
}

type MessageProducer

type MessageProducer interface {
	// ProduceMessage produces a message to a messaging system
	ProduceMessage(ctx context.Context, id domain.ClientIdentifier, eventType string, payload []byte) error
}

type MessageReader added in v0.0.40

type MessageReader interface {
	// Start starts the message reader and blocks until the context is done
	Start(mainContext context.Context, adapter adapters.Adapter)
}

type NewChecksumMessage

type NewChecksumMessage struct {
	Checksum        string `json:"checksum"`
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	ResourceVersion int    `json:"resourceVersion"`
}

type NewObjectMessage

type NewObjectMessage struct {
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Object          []byte `json:"patch"`
	ResourceVersion int    `json:"resourceVersion"`
}

type PatchObjectMessage

type PatchObjectMessage struct {
	Checksum        string `json:"checksum"`
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Patch           []byte `json:"patch"`
	ResourceVersion int    `json:"resourceVersion"`
}

type PutObjectMessage

type PutObjectMessage struct {
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	Object          []byte `json:"patch"`
	ResourceVersion int    `json:"resourceVersion"`
}

type ReconciliationRequestMessage added in v0.0.47

type ReconciliationRequestMessage struct {
	Cluster         string                                   `json:"cluster"`
	Account         string                                   `json:"account"`
	Depth           int                                      `json:"depth"`
	MsgId           string                                   `json:"msgId"`
	ServerInitiated bool                                     `json:"serverInitiated"`
	KindToObjects   map[string][]ReconciliationRequestObject `json:"kindToObject"`
}

type ReconciliationRequestObject added in v0.0.47

type ReconciliationRequestObject struct {
	Checksum        string `json:"checksum"`
	ResourceVersion int    `json:"resourceVersion"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
}

type ServerConnectedMessage

type ServerConnectedMessage struct {
	Cluster string `json:"cluster"`
	Account string `json:"account"`
	Depth   int    `json:"depth"`
	MsgId   string `json:"msgId"`
}

type VerifyObjectMessage

type VerifyObjectMessage struct {
	Checksum        string `json:"checksum"`
	Cluster         string `json:"cluster"`
	Account         string `json:"account"`
	Depth           int    `json:"depth"`
	Kind            string `json:"kind"`
	MsgId           string `json:"msgId"`
	Name            string `json:"name"`
	Namespace       string `json:"namespace"`
	ResourceVersion int    `json:"resourceVersion"`
}

Jump to

Keyboard shortcuts

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