store

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

type InMemory struct {
	sync.Mutex
	TraceID
	// contains filtered or unexported fields
}

func NewInMemory

func NewInMemory(ti TraceID) *InMemory

func (*InMemory) Acknowledge

func (ms *InMemory) Acknowledge(msg Trace) error

func (*InMemory) Result

func (ms *InMemory) Result() Result

func (*InMemory) Track

func (ms *InMemory) Track(msg Trace) error

func (*InMemory) Unacknowledged

func (ms *InMemory) Unacknowledged() ([]string, error)

type InMemoryStoreMock

type InMemoryStoreMock struct {
	mock.Mock
}

func (*InMemoryStoreMock) Acknowledge

func (m *InMemoryStoreMock) Acknowledge(msg Trace) error

func (*InMemoryStoreMock) Result

func (m *InMemoryStoreMock) Result() Result

func (*InMemoryStoreMock) Track

func (m *InMemoryStoreMock) Track(msg Trace) error

func (*InMemoryStoreMock) Unacknowledged

func (m *InMemoryStoreMock) Unacknowledged() ([]string, error)

type MsgStore

type MsgStore interface {
	Acknowledge(msg Trace) error
	Track(msg Trace) error
	Unacknowledged() ([]string, error)
	Result() Result
}

func New

func New(cfg config.Store, traceID TraceID) (MsgStore, error)

type Redis

type Redis struct {
	TraceID
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis(redisaddr, namespace string, ti TraceID) (*Redis, error)

func (*Redis) Acknowledge

func (rs *Redis) Acknowledge(msg Trace) error

func (*Redis) Result

func (rs *Redis) Result() Result

func (*Redis) Track

func (rs *Redis) Track(msg Trace) error

func (*Redis) Unacknowledged

func (rs *Redis) Unacknowledged() ([]string, error)

type Result

type Result struct {
	Tracked      int64
	Acknowledged int64
}

type Trace

type Trace struct {
	creator.Message
	kafka.TopicPartition
}

type TraceID

type TraceID func(Trace) string

Jump to

Keyboard shortcuts

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