store

package
v0.0.0-...-7c4325e Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStoreNotInitialised = errors.New("Store is not initialised")
	ErrInvalidFrame        = errors.New("Frame is invalid")
	ErrInvalidTrace        = errors.New("Trace is invalid")
	ErrInvalidTraceId      = errors.New("TraceId is invalid")
)

Functions

This section is empty.

Types

type MemoryStore

type MemoryStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemoryStore

func NewMemoryStore() *MemoryStore

NewMemoryStore initialises and returns a new MemoryStore

func (*MemoryStore) ReadTrace

func (s *MemoryStore) ReadTrace(id string) (*domain.Trace, error)

ReadTrace retrieves a full Trace, composed of Frames from the store by ID

func (*MemoryStore) StoreFrame

func (s *MemoryStore) StoreFrame(f *domain.Frame) error

StoreTraceFrame into the store, if the trace doesn't not already exist this will be created for the global trace ID

type Store

type Store interface {
	ReadTrace(id string) (*domain.Trace, error)
	StoreFrame(f *domain.Frame) error
}

Jump to

Keyboard shortcuts

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