combainer

package
v0.0.0-...-e6af7e3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2016 License: LGPL-3.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CONFIGS_PARSING_PATH     = "/etc/combaine/parsing/"
	CONFIGS_AGGREGATION_PATH = "/etc/combaine/aggregate"
	COMBAINER_PATH           = "/etc/combaine/combaine.yaml"
)

Variables

View Source
var (
	ErrHandlerTimeout = errors.New("Timeout")
	ErrZeroPeriod     = errors.New("MINIMUM_PERIOD must be positive")
)
View Source
var GlobalMetrics = Metrics{
	// contains filtered or unexported fields
}

Functions

func Dashboard

func Dashboard(w http.ResponseWriter, r *http.Request)

func GenerateSessionId

func GenerateSessionId() string

var GenerateSessionId = uuid.New

func GenerateSessionTimeFrame

func GenerateSessionTimeFrame(sessionDuration uint) (time.Duration, time.Duration)

func GetAggregationConfigs

func GetAggregationConfigs(repo configs.Repository, parsingConfig *configs.ParsingConfig) (*map[string]configs.AggregationConfig, error)

func GetRouter

func GetRouter(context ServerContext) http.Handler

func JsonToWriter

func JsonToWriter(w io.Writer, v interface{}) error

func Launch

func Launch(s ServerContext, w http.ResponseWriter, r *http.Request)

func ParsingConfigs

func ParsingConfigs(s ServerContext, w http.ResponseWriter, r *http.Request)

func ReadParsingConfig

func ReadParsingConfig(s ServerContext, w http.ResponseWriter, r *http.Request)

func RegisterFetcherLoader

func RegisterFetcherLoader(name string, f FetcherLoader) error

func Tasks

Types

type Client

type Client struct {
	*Context
	*Stats
	Id         string
	Repository configs.Repository
	Log        *logrus.Entry
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx *Context, repo configs.Repository) (*Client, error)

func (*Client) Dispatch

func (cl *Client) Dispatch(parsingConfigName string, uniqueID string, shouldWait bool) error

func (*Client) UpdateSessionParams

func (cl *Client) UpdateSessionParams(config string) (sp *sessionParams, err error)

type Context

type Context struct {
	*logrus.Logger
	Cache     cache.Cache
	Discovery discovery.Discovery
	Resolver  slave.Resolver
}

type FetcherLoader

type FetcherLoader func(*Context, map[string]interface{}) (HostFetcher, error)

type HostFetcher

type HostFetcher interface {
	Fetch(group string) (hosts.Hosts, error)
}

func LoadHostFetcher

func LoadHostFetcher(context *Context, config configs.PluginConfig) (HostFetcher, error)

type Metrics

type Metrics struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Metrics) GetRegistries

func (m *Metrics) GetRegistries() map[string]metrics.Registry

func (*Metrics) GetRegistry

func (m *Metrics) GetRegistry(config string) metrics.Registry

func (*Metrics) RegisterRegistry

func (m *Metrics) RegisterRegistry(r metrics.Registry, name string)

func (*Metrics) UnregisterRegistry

func (m *Metrics) UnregisterRegistry(name string)

type PredefineFetcher

type PredefineFetcher struct {
	PredefineFetcherConfig
	// contains filtered or unexported fields
}

func (*PredefineFetcher) Fetch

func (p *PredefineFetcher) Fetch(groupname string) (hosts.Hosts, error)

type PredefineFetcherConfig

type PredefineFetcherConfig struct {
	Clusters map[string]hosts.Hosts
}

type ServerContext

type ServerContext interface {
	GetContext() *Context
	GetRepository() configs.Repository
}

type SimpleFetcher

type SimpleFetcher struct {
	SimpleFetcherConfig
	*Context
}

func (*SimpleFetcher) Fetch

func (s *SimpleFetcher) Fetch(groupname string) (hosts.Hosts, error)

type SimpleFetcherConfig

type SimpleFetcherConfig struct {
	Separator string
	BasicUrl  string
}

type Stats

type Stats struct {
	Registry metrics.Registry
	// contains filtered or unexported fields
}

func NewStats

func NewStats() *Stats

func (*Stats) AddFailedAggregate

func (s *Stats) AddFailedAggregate()

func (*Stats) AddFailedParsing

func (s *Stats) AddFailedParsing()

func (*Stats) AddSuccessAggregate

func (s *Stats) AddSuccessAggregate()

func (*Stats) AddSuccessParsing

func (s *Stats) AddSuccessParsing()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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