context

package
v0.0.0-...-389ea72 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceContext

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

ServiceContext repersents context for services

func NewServiceContext

func NewServiceContext(name string, dataDir string, logsDir string, debug bool) *ServiceContext

NewServiceContext creates a new ServiceContext

func (*ServiceContext) DataTransaction

func (sc *ServiceContext) DataTransaction(write bool, fn func(tx *badger.Txn) error) error

DataTransaction creates a new data storage transaction

func (ServiceContext) DebugEnabled

func (c ServiceContext) DebugEnabled() bool

func (ServiceContext) GetLogger

func (c ServiceContext) GetLogger() *logging.LogHandler

func (ServiceContext) LogToFile

func (c ServiceContext) LogToFile(filename string, data []byte, subdirs ...string) error

Jump to

Keyboard shortcuts

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