backend

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// this will be used to filter out messages by the synchronizer server consumer (so it doesn't process its own messages)
	SynchronizerServerProducerKey = "SynchronizerServerProducer"
)

Variables

This section is empty.

Functions

func NewProducerMessage added in v0.0.5

func NewProducerMessage(producerMessageKey, account, cluster, eventType string, payload []byte, optionalProperties ...map[string]string) *pulsar.ProducerMessage

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func NewBackendAdapter

func NewBackendAdapter(mainContext context.Context, messageProducer messaging.MessageProducer, cfg config.Backend) *Adapter

func (*Adapter) Batch added in v0.0.47

func (b *Adapter) Batch(ctx context.Context, kind domain.Kind, batchType domain.BatchType, items domain.BatchItems) error

func (*Adapter) Callbacks added in v0.0.5

func (b *Adapter) Callbacks(ctx context.Context) (domain.Callbacks, error)

func (*Adapter) DeleteObject

func (b *Adapter) DeleteObject(ctx context.Context, id domain.KindName) error

func (*Adapter) GetObject

func (b *Adapter) GetObject(ctx context.Context, id domain.KindName, baseObject []byte) error

func (*Adapter) IsRelated added in v0.0.38

func (b *Adapter) IsRelated(ctx context.Context, id domain.ClientIdentifier) bool

func (*Adapter) PatchObject

func (b *Adapter) PatchObject(ctx context.Context, id domain.KindName, checksum string, patch []byte) error

func (*Adapter) PutObject

func (b *Adapter) PutObject(ctx context.Context, id domain.KindName, object []byte) error

func (*Adapter) RegisterCallbacks

func (b *Adapter) RegisterCallbacks(ctx context.Context, callbacks domain.Callbacks)

func (*Adapter) Start

func (b *Adapter) Start(ctx context.Context) error

func (*Adapter) Stop added in v0.0.38

func (b *Adapter) Stop(ctx context.Context) error

func (*Adapter) VerifyObject

func (b *Adapter) VerifyObject(ctx context.Context, id domain.KindName, checksum string) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(producer messaging.MessageProducer) *Client

func (*Client) Batch added in v0.0.47

func (c *Client) Batch(ctx context.Context, kind domain.Kind, batchType domain.BatchType, items domain.BatchItems) error

func (*Client) Callbacks added in v0.0.5

func (c *Client) Callbacks(_ context.Context) (domain.Callbacks, error)

func (*Client) DeleteObject

func (c *Client) DeleteObject(ctx context.Context, id domain.KindName) error

func (*Client) GetObject

func (c *Client) GetObject(ctx context.Context, id domain.KindName, baseObject []byte) error

func (*Client) IsRelated added in v0.0.38

func (c *Client) IsRelated(ctx context.Context, id domain.ClientIdentifier) bool

func (*Client) PatchObject

func (c *Client) PatchObject(ctx context.Context, id domain.KindName, checksum string, patch []byte) error

func (*Client) PutObject

func (c *Client) PutObject(ctx context.Context, id domain.KindName, object []byte) error

func (*Client) RegisterCallbacks

func (c *Client) RegisterCallbacks(_ context.Context, callbacks domain.Callbacks)

func (*Client) SendReconciliationRequestMessage added in v0.0.47

func (c *Client) SendReconciliationRequestMessage(ctx context.Context) error

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) Stop added in v0.0.38

func (c *Client) Stop(_ context.Context) error

func (*Client) VerifyObject

func (c *Client) VerifyObject(ctx context.Context, id domain.KindName, checksum string) error

type PulsarMessageProducer added in v0.0.5

type PulsarMessageProducer struct {
	// contains filtered or unexported fields
}

func NewPulsarMessageProducer added in v0.0.5

func NewPulsarMessageProducer(cfg config.Config, pulsarClient pulsarconnector.Client) (*PulsarMessageProducer, error)

func (*PulsarMessageProducer) ProduceMessage added in v0.0.5

func (p *PulsarMessageProducer) ProduceMessage(ctx context.Context, id domain.ClientIdentifier, eventType string, payload []byte, optionalProperties ...map[string]string) error

func (*PulsarMessageProducer) ProduceMessageWithoutIdentifier added in v0.0.64

func (p *PulsarMessageProducer) ProduceMessageWithoutIdentifier(ctx context.Context, eventType string, payload []byte) error

type PulsarMessageReader added in v0.0.40

type PulsarMessageReader struct {
	// contains filtered or unexported fields
}

func NewPulsarMessageReader added in v0.0.40

func NewPulsarMessageReader(cfg config.Config, pulsarClient pulsarconnector.Client) (*PulsarMessageReader, error)

func (*PulsarMessageReader) Start added in v0.0.40

func (c *PulsarMessageReader) Start(mainCtx context.Context, adapter adapters.Adapter)

Jump to

Keyboard shortcuts

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