messaging

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 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"
)

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"`
}

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"`
}

type MessageConsumer

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

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 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"`
}

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"`
}

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"`
}

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"`
}

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"`
}

Jump to

Keyboard shortcuts

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