msg_storer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

README

storer

test

DEBUG_LEVEL=error TEST_MODE=true go test -race -v . -bench=.

Documentation

Index

Constants

View Source
const (
	DefaultCurrentDB    = "current.db"
	DefaultArchiveIndex = "archive.index"
	DefaultDatastore    = "./datastore"

	DefaultDomain  = "onglai-msg"
	DefaultSubject = "%s.archive.bucket.job.%s"
)

Variables

View Source
var (
	ErrSeqNotFound = errors.New("Sequence not fount in the index.")
)

Functions

func Module

func Module(scope string) fx.Option

Types

type Params

type Params struct {
	fx.In
	NATSConnector *nats_connector.NATSConnector
	Lifecycle     fx.Lifecycle
	Logger        *zap.Logger
}

type Storer

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

func (*Storer) GetArchivedFileBySeq

func (sr *Storer) GetArchivedFileBySeq(dstPath string, seq uint64) (string, error)

func (*Storer) MsgStore

func (sr *Storer) MsgStore(dstPath string, seq uint64, rawData []byte) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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