base

package
v0.0.0-...-2081a44 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientConnectionCounter *prometheus.CounterVec
View Source
var ErrNotFound = eerrors.New("not found")
View Source
var Handles []ServiceHandle
View Source
var HandlesMap map[ServiceHandle]uintptr
View Source
var INFOS = []byte("infos")
View Source
var IncomingMsgsCounter *prometheus.CounterVec
View Source
var Names2Types = map[string]Types{
	"skewer-tcp":         TCP,
	"skewer-udp":         UDP,
	"skewer-relp":        RELP,
	"skewer-directrelp":  DirectRELP,
	"skewer-journal":     Journal,
	"skewer-store":       Store,
	"skewer-accounting":  Accounting,
	"skewer-kafkasource": KafkaSource,
	"skewer-conf":        Configuration,
	"skewer-graylog":     Graylog,
	"skewer-files":       Filesystem,
	"skewer-httpserver":  HTTPServer,
	"skewer-macos":       MacOS,
}
View Source
var Once sync.Once
View Source
var ParsingErrorCounter *prometheus.CounterVec
View Source
var SP = []byte(" ")
View Source
var SUCC = []byte("SUCCESS")
View Source
var SYSLOG = []byte("syslog")
View Source
var Types2ConfinedNames map[Types]string
View Source
var Types2Names map[Types]string

Functions

func BinderHdl

func BinderHdl(typ Types) uintptr

func CountClientConnection

func CountClientConnection(t Types, client string, port int, path string)

func CountIncomingMessage

func CountIncomingMessage(t Types, client string, port int, path string)

func CountParsingError

func CountParsingError(t Types, client string, parserName string)

func InitRegistry

func InitRegistry()

func LoggerHdl

func LoggerHdl(typ Types) uintptr

func Name

func Name(t Types, cfnd bool) (string, error)

Types

type BaseService

type BaseService struct {
	ParserConfigs   []conf.ParserConfig
	Logger          log15.Logger
	Binder          binder.Client
	UnixSocketPaths []string
	Connections     map[io.Closer]bool
	QueueSize       uint64
	// contains filtered or unexported fields
}

func (*BaseService) AddConnection

func (s *BaseService) AddConnection(conn io.Closer)

func (*BaseService) ClearConnections

func (s *BaseService) ClearConnections()

func (*BaseService) CloseConnections

func (s *BaseService) CloseConnections()

func (*BaseService) Init

func (s *BaseService) Init()

func (*BaseService) LockStatus

func (s *BaseService) LockStatus()

func (*BaseService) RemoveConnection

func (s *BaseService) RemoveConnection(conn io.Closer)

func (*BaseService) SetConf

func (s *BaseService) SetConf(pc []conf.ParserConfig, queueSize uint64)

func (*BaseService) UnlockStatus

func (s *BaseService) UnlockStatus()

type HandleType

type HandleType uint8
const (
	Binder HandleType = iota
	Logger
)

type Provider

type Provider interface {
	Start() ([]model.ListenerInfo, error)
	Stop()
	Shutdown()
	Gather() ([]*dto.MetricFamily, error)
	FatalError() chan struct{}
	Type() Types
	SetConf(c conf.BaseConfig)
}

type ProviderEnv

type ProviderEnv struct {
	Confined bool
	Profile  bool
	Ring     kring.Ring
	Reporter *Reporter
	Binder   binder.Client
	Logger   log15.Logger
	Pipe     *os.File
}

type Reporter

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

Reporter is used by plugins to report new syslog messages to the controller.

func NewReporter

func NewReporter(name string, l log15.Logger, pipe *os.File) *Reporter

NewReporter creates a reporter.

func (*Reporter) Report

func (s *Reporter) Report(infos []model.ListenerInfo) error

Report reports information about the actual listening ports to the controller.

func (*Reporter) SetSecret

func (s *Reporter) SetSecret(secret *memguard.LockedBuffer)

func (*Reporter) Start

func (s *Reporter) Start()

func (*Reporter) Stash

func (s *Reporter) Stash(m *model.FullMessage) error

Stash reports one syslog message to the controller.

func (*Reporter) Stop

func (s *Reporter) Stop()

Stop stops the reporter.

type ServiceHandle

type ServiceHandle struct {
	Service string
	Type    HandleType
}

type Types

type Types int
const (
	TCP Types = iota
	UDP
	RELP
	DirectRELP
	Journal
	Store
	Accounting
	KafkaSource
	Configuration
	Graylog
	Filesystem
	HTTPServer
	MacOS
)

func Type

func Type(name string) (t Types, cfnd bool, err error)

Jump to

Keyboard shortcuts

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