config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = config{
	LeaseTime:       1000 * time.Millisecond,
	MaxRecordLength: 2,
	IdGenerator:     NewUUIDGenerator(),
	Serializer:      serializer.NewJSONSerializer(),
	LogLevel:        zapcore.InfoLevel,
}

Functions

This section is empty.

Types

type DataStoreType

type DataStoreType string
const (
	MEMORY DataStoreType = "memory"
)

type IdGenerator

type IdGenerator interface {
	GenerateId() string
}

type IncrementalGenerator

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

func NewIncrementalGenerator

func NewIncrementalGenerator() *IncrementalGenerator

func (*IncrementalGenerator) GenerateId

func (i *IncrementalGenerator) GenerateId() string

type State

type State int
const (
	EMPTY     State = 0
	STARTED   State = 1
	PREPARED  State = 2
	COMMITTED State = 3
	ABORTED   State = 4
)

func (State) MarshalBinary

func (s State) MarshalBinary() (data []byte, err error)

func (State) UnmarshalBinary

func (s State) UnmarshalBinary(data []byte) error

type UUIDGenerator

type UUIDGenerator struct {
}

func NewUUIDGenerator

func NewUUIDGenerator() *UUIDGenerator

func (*UUIDGenerator) GenerateId

func (u *UUIDGenerator) GenerateId() string

Jump to

Keyboard shortcuts

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