queue

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package queue defines the durable asynchronous mutation publisher contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalMutation

func MarshalMutation(mutation Mutation) ([]byte, error)

func MutationKey

func MutationKey(mutation Mutation) ([]byte, error)

func MutationSize

func MutationSize(mutation Mutation) int

MutationSize includes the queue envelope without allocating its payload.

func MutationStore

func MutationStore(mutation Mutation) (string, error)

Types

type Mutation

type Mutation struct {
	Write  *sink.WriteOperation
	Delete *sink.DeleteOperation
}

func UnmarshalMutation

func UnmarshalMutation(envelope []byte) (Mutation, error)

type PublishRequest

type PublishRequest struct {
	Mutations []Mutation
}

type PublishResponse

type PublishResponse struct {
	Results []PublishResult
}

type PublishResult

type PublishResult struct {
	Status PublishStatus
	Err    error
}

type PublishStatus

type PublishStatus uint8
const (
	PublishStatusUnspecified PublishStatus = iota
	PublishStatusAccepted
	PublishStatusFailed
)

type Publisher

type Publisher interface {
	Publish(ctx context.Context, req PublishRequest) (PublishResponse, error)
}

Directories

Path Synopsis
Package kafka provides a durable Kafka mutation publisher and consumer.
Package kafka provides a durable Kafka mutation publisher and consumer.

Jump to

Keyboard shortcuts

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