storage

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Start()
	Write(string, string) error
	Read(string, int) ([]string, error)
	Destroy(string) error
	Reopen() error
	Stop()
}

Adapter is an interface for pluggable components that store log messages.

func NewAdapter

func NewAdapter(adapterType string, numLines int) (Adapter, error)

NewAdapter returns a pointer to an appropriate implementation of the Adapter interface, as determined by the adapterType string it is passed.

func NewFileAdapter

func NewFileAdapter() (Adapter, error)

NewFileAdapter returns an Adapter that uses a file.

func NewRedisStorageAdapter

func NewRedisStorageAdapter(bufferSize int) (Adapter, error)

NewRedisStorageAdapter returns a pointer to a new instance of a redis-based storage.Adapter.

func NewRingBufferAdapter

func NewRingBufferAdapter(bufferSize int) (Adapter, error)

NewRingBufferAdapter returns a storage adapter that uses an in-memory ring buffer of the given size.

Jump to

Keyboard shortcuts

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