Documentation ¶
Index ¶
- Variables
- func AccountingPathOpt(path string) func(*PluginCreateOpts)
- func CertFilesOpt(list []string) func(*PluginCreateOpts)
- func CertPathsOpt(list []string) func(*PluginCreateOpts)
- func ConfDirOpt(path string) func(*PluginCreateOpts)
- func Configure(t base.Types, c conf.BaseConfig) (res conf.BaseConfig)
- func ConfigureAndStartService(s base.Provider, c conf.BaseConfig) ([]model.ListenerInfo, error)
- func DumpableOpt(dumpable bool) func(*PluginCreateOpts)
- func FileDestTmplOpt(path string) func(*PluginCreateOpts)
- func Launch(ctx context.Context, typ base.Types, opts ...ProviderOpt) (err error)
- func LaunchConfProvider(ctx context.Context, r kring.Ring, confined bool, logger log15.Logger) (err error)
- func MakeFilter(globstring string) (tail.FilterFunc, error)
- func NewAccountingService(env *base.ProviderEnv) (base.Provider, error)
- func NewFilePollingService(env *base.ProviderEnv) (base.Provider, error)
- func NewStoreService(env *base.ProviderEnv) (base.Provider, error)
- func PollDirectories(dirs []string) func(*PluginCreateOpts)
- func ProfileOpt(profile bool) func(*PluginCreateOpts)
- func ProviderFactory(t base.Types, env *base.ProviderEnv) (base.Provider, error)
- func SetBinder(bindr binder.Client) func(e *base.ProviderEnv)
- func SetConfined(confined bool) func(e *base.ProviderEnv)
- func SetLogger(logger log15.Logger) func(e *base.ProviderEnv)
- func SetPipe(pipe *os.File) func(e *base.ProviderEnv)
- func SetProfile(profile bool) func(e *base.ProviderEnv)
- func SetReporter(reporter *base.Reporter) func(e *base.ProviderEnv)
- func SetRing(ring kring.Ring) func(e *base.ProviderEnv)
- func StorePathOpt(path string) func(*PluginCreateOpts)
- func WConf(header []byte, message []byte) (err error)
- func Wout(header []byte, msg []byte) (err error)
- type AccountingService
- func (s *AccountingService) FatalError() chan struct{}
- func (s *AccountingService) Gather() ([]*dto.MetricFamily, error)
- func (s *AccountingService) SetConf(c conf.BaseConfig)
- func (s *AccountingService) Shutdown()
- func (s *AccountingService) Start() (infos []model.ListenerInfo, err error)
- func (s *AccountingService) Stop()
- func (s *AccountingService) Type() base.Types
- type CFactory
- type ConfigurationService
- func (c *ConfigurationService) Chan() chan *conf.BaseConfig
- func (c *ConfigurationService) Reload() error
- func (c *ConfigurationService) SetConfDir(cdir string)
- func (c *ConfigurationService) SetConsulParams(params consul.ConnParams)
- func (c *ConfigurationService) Start(r kring.Ring) error
- func (c *ConfigurationService) Stop() error
- func (c *ConfigurationService) Type() base.Types
- func (c *ConfigurationService) W(header []byte, message []byte) (err error)
- type Controller
- func (s *Controller) Create(optsfuncs ...func(*PluginCreateOpts)) error
- func (s *Controller) Gather() (m []*dto.MetricFamily, err error)
- func (s *Controller) SetConf(c conf.BaseConfig)
- func (s *Controller) Shutdown(killTimeOut time.Duration) (killed bool)
- func (s *Controller) Start() (infos []model.ListenerInfo, err error)
- func (s *Controller) Stop() error
- func (s *Controller) W(header []byte, message []byte) (err error)
- type FilePollingService
- func (s *FilePollingService) FatalError() chan struct{}
- func (s *FilePollingService) Gather() ([]*dto.MetricFamily, error)
- func (s *FilePollingService) SetConf(c conf.BaseConfig)
- func (s *FilePollingService) Shutdown()
- func (s *FilePollingService) Start() (infos []model.ListenerInfo, err error)
- func (s *FilePollingService) Stop()
- func (s *FilePollingService) Type() base.Types
- type PluginCreateOpts
- type ProviderOpt
- type StoreController
Constants ¶
This section is empty.
Variables ¶
var CONF = []byte("conf")
var CONFERROR = []byte("conferror")
var ErrTruncated = eerrors.New("file has been truncated")
var GATHER = []byte("gathermetrics")
var METRICS = []byte("metrics")
var NOLISTENER = eerrors.New("no listener")
var SHUTDOWN = []byte("shutdown")
var START = []byte("start")
var STARTED = []byte("started")
var STARTERROR = []byte("starterror")
var STOP = []byte("stop")
var STOPPED = []byte("stopped")
Functions ¶
func AccountingPathOpt ¶
func AccountingPathOpt(path string) func(*PluginCreateOpts)
func CertFilesOpt ¶
func CertFilesOpt(list []string) func(*PluginCreateOpts)
func CertPathsOpt ¶
func CertPathsOpt(list []string) func(*PluginCreateOpts)
func ConfDirOpt ¶
func ConfDirOpt(path string) func(*PluginCreateOpts)
func Configure ¶
func Configure(t base.Types, c conf.BaseConfig) (res conf.BaseConfig)
func ConfigureAndStartService ¶
func ConfigureAndStartService(s base.Provider, c conf.BaseConfig) ([]model.ListenerInfo, error)
func DumpableOpt ¶
func DumpableOpt(dumpable bool) func(*PluginCreateOpts)
func FileDestTmplOpt ¶
func FileDestTmplOpt(path string) func(*PluginCreateOpts)
func LaunchConfProvider ¶
func MakeFilter ¶
func MakeFilter(globstring string) (tail.FilterFunc, error)
func NewAccountingService ¶
func NewAccountingService(env *base.ProviderEnv) (base.Provider, error)
func NewFilePollingService ¶
func NewFilePollingService(env *base.ProviderEnv) (base.Provider, error)
func NewStoreService ¶
func NewStoreService(env *base.ProviderEnv) (base.Provider, error)
NewStoreService creates a StoreService. The StoreService is responsible to manage the lifecycle of the Store and the Kafka Forwarder that is fed by the Store.
func PollDirectories ¶
func PollDirectories(dirs []string) func(*PluginCreateOpts)
func ProfileOpt ¶
func ProfileOpt(profile bool) func(*PluginCreateOpts)
func ProviderFactory ¶
func SetConfined ¶
func SetConfined(confined bool) func(e *base.ProviderEnv)
func SetProfile ¶
func SetProfile(profile bool) func(e *base.ProviderEnv)
func SetReporter ¶
func SetReporter(reporter *base.Reporter) func(e *base.ProviderEnv)
func StorePathOpt ¶
func StorePathOpt(path string) func(*PluginCreateOpts)
Types ¶
type AccountingService ¶
type AccountingService struct { Conf conf.AccountingSourceConfig // contains filtered or unexported fields }
func (*AccountingService) FatalError ¶
func (s *AccountingService) FatalError() chan struct{}
func (*AccountingService) Gather ¶
func (s *AccountingService) Gather() ([]*dto.MetricFamily, error)
func (*AccountingService) SetConf ¶
func (s *AccountingService) SetConf(c conf.BaseConfig)
func (*AccountingService) Shutdown ¶
func (s *AccountingService) Shutdown()
func (*AccountingService) Start ¶
func (s *AccountingService) Start() (infos []model.ListenerInfo, err error)
func (*AccountingService) Stop ¶
func (s *AccountingService) Stop()
func (*AccountingService) Type ¶
func (s *AccountingService) Type() base.Types
type CFactory ¶
type CFactory struct {
// contains filtered or unexported fields
}
func ControllerFactory ¶
func ControllerFactory(ring kring.Ring, signKey *memguard.LockedBuffer, stasher *StoreController, registry *consul.Registry, logger log15.Logger) *CFactory
func (*CFactory) NewStore ¶
func (f *CFactory) NewStore(loggerHandle uintptr) *StoreController
type ConfigurationService ¶
type ConfigurationService struct {
// contains filtered or unexported fields
}
func NewConfigurationService ¶
func NewConfigurationService(ring kring.Ring, signKey *memguard.LockedBuffer, childLoggerHandle uintptr, l log15.Logger) (*ConfigurationService, error)
func (*ConfigurationService) Chan ¶
func (c *ConfigurationService) Chan() chan *conf.BaseConfig
func (*ConfigurationService) Reload ¶
func (c *ConfigurationService) Reload() error
func (*ConfigurationService) SetConfDir ¶
func (c *ConfigurationService) SetConfDir(cdir string)
func (*ConfigurationService) SetConsulParams ¶
func (c *ConfigurationService) SetConsulParams(params consul.ConnParams)
func (*ConfigurationService) Stop ¶
func (c *ConfigurationService) Stop() error
func (*ConfigurationService) Type ¶
func (c *ConfigurationService) Type() base.Types
type Controller ¶
type Controller struct { ShutdownChan chan struct{} StopChan chan struct{} // ExitCode should be read only after ShutdownChan has been closed ExitCode int // contains filtered or unexported fields }
Controller launches and controls the various services by distinct processes.
func (*Controller) Create ¶
func (s *Controller) Create(optsfuncs ...func(*PluginCreateOpts)) error
func (*Controller) Gather ¶
func (s *Controller) Gather() (m []*dto.MetricFamily, err error)
Gather asks the controlled plugin to report its metrics
func (*Controller) SetConf ¶
func (s *Controller) SetConf(c conf.BaseConfig)
SetConf gives the current global configuration to the controller. The controller will communicate the configuration to the controlled plugin at next start.
func (*Controller) Shutdown ¶
func (s *Controller) Shutdown(killTimeOut time.Duration) (killed bool)
Shutdown demands that the controlled plugin shutdowns now. After killTimeOut, it kills the plugin.
func (*Controller) Start ¶
func (s *Controller) Start() (infos []model.ListenerInfo, err error)
Start asks the controlled plugin to start the operations.
func (*Controller) Stop ¶
func (s *Controller) Stop() error
Stop kindly asks the controlled plugin to stop activity
type FilePollingService ¶
type FilePollingService struct {
// contains filtered or unexported fields
}
func (*FilePollingService) FatalError ¶
func (s *FilePollingService) FatalError() chan struct{}
func (*FilePollingService) Gather ¶
func (s *FilePollingService) Gather() ([]*dto.MetricFamily, error)
func (*FilePollingService) SetConf ¶
func (s *FilePollingService) SetConf(c conf.BaseConfig)
func (*FilePollingService) Shutdown ¶
func (s *FilePollingService) Shutdown()
func (*FilePollingService) Start ¶
func (s *FilePollingService) Start() (infos []model.ListenerInfo, err error)
func (*FilePollingService) Stop ¶
func (s *FilePollingService) Stop()
func (*FilePollingService) Type ¶
func (s *FilePollingService) Type() base.Types
type PluginCreateOpts ¶
type PluginCreateOpts struct {
// contains filtered or unexported fields
}
type ProviderOpt ¶
type ProviderOpt func(e *base.ProviderEnv)
type StoreController ¶
type StoreController struct { *Controller // contains filtered or unexported fields }
StoreController is the specialized controller that takes care of the Store.
func (*StoreController) Shutdown ¶
func (s *StoreController) Shutdown(killTimeOut time.Duration)
Shutdown stops definetely the Store.
func (*StoreController) Start ¶
func (s *StoreController) Start() (infos []model.ListenerInfo, err error)
func (*StoreController) Stash ¶
func (s *StoreController) Stash(m *model.FullMessage) error
Stash sends the given message to the Store