services

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectService

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

func NewObjectService

func NewObjectService(cfg *config.Config) *ObjectService

NewObjectService creates a new instance of ObjectService without any dependencies.

func (*ObjectService) Delete

func (a *ObjectService) Delete(ctx context.Context, key string) (err error)

Delete removes an object identified by the key from the port and logs the operation.

func (*ObjectService) Get

func (a *ObjectService) Get(ctx context.Context, key string) (value string, err error)

Get retrieves an object identified by the key from the port.

func (*ObjectService) Put

func (a *ObjectService) Put(ctx context.Context, key, value string) (err error)

Put adds or updates an object identified by the key and logs the operation.

func (*ObjectService) Setup

func (a *ObjectService) Setup() (err error)

Setup initializes the ObjectService by processing pending events from the transactional logger and applying them to the data store.

func (*ObjectService) Teardown

func (a *ObjectService) Teardown()

Teardown cleans up any resources used by the ObjectService.

func (*ObjectService) WithPort

WithPort sets the ObjectPort for the service and returns the updated service.

func (*ObjectService) WithTransactionalLogger

func (a *ObjectService) WithTransactionalLogger(logger consistency.Logger[string, string]) *ObjectService

WithTransactionalLogger sets the transactional logger for the service and returns the updated service.

Jump to

Keyboard shortcuts

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