base

package
v4.0.0-...-5981c31 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParameter = errors.New("invalid parameter")
	ErrNotReady         = errors.New("IngesterBase is not ready")
)

Functions

This section is empty.

Types

type IngesterBase

type IngesterBase struct {
	IngesterBaseConfig
	Verbose bool
	Logger  *log.Logger
	Cfg     interface{}
	// contains filtered or unexported fields
}

func Init

func Init(ibc IngesterBaseConfig) (ib IngesterBase, err error)

func (IngesterBase) AnnounceShutdown

func (ib IngesterBase) AnnounceShutdown()

func (IngesterBase) AnnounceStartup

func (ib IngesterBase) AnnounceStartup()

func (*IngesterBase) AssignConfig

func (ib *IngesterBase) AssignConfig(v interface{}) (err error)

AssignConfig is a helper function that can take care of most of the sanity checking when trying to turn a native config object generated by IngesterBaseConfig.GetConfigFunc into the native type assigned into IngesterBase.Cfg.

Basically we are going to use some reflect foo to reduct the amount of boiler plate code needed by users of this library

func (*IngesterBase) Debug

func (ib *IngesterBase) Debug(format string, args ...interface{})

func (*IngesterBase) GetMuxer

func (ib *IngesterBase) GetMuxer() (igst *ingest.IngestMuxer, err error)

func (*IngesterBase) RegisterStat

func (ib *IngesterBase) RegisterStat(name string) (*utils.StatsItem, error)

type IngesterBaseConfig

type IngesterBaseConfig struct {
	IngesterName                 string
	AppName                      string
	DefaultConfigLocation        string
	DefaultConfigOverlayLocation string
	GetConfigFunc                interface{}
}

Jump to

Keyboard shortcuts

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