syslog-service: github.com/elodina/syslog-service/syslog Index | Files | Directories

package syslog

import "github.com/elodina/syslog-service/syslog"

Index

Package Files

api.go brokers.go cluster.go config.go executor.go http_server.go scheduler.go syslog_producer.go

Constants

const (
    TransformNone = "none"
    TransformAvro = "avro"
)

Variables

var Config *config = &config{
    FrameworkName: "syslog-kafka",
    FrameworkRole: "*",
    Cpus:          0.1,
    Mem:           64,
    NumProducers:  1,
    ChannelSize:   10000,
    TcpPort:       "auto",
    UdpPort:       "auto",
    Transform:     "none",
    LogLevel:      "info",
}
var Logger log.LoggerInterface

func InitLogging Uses

func InitLogging(level string) error

type ApiRequest Uses

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

func NewApiRequest Uses

func NewApiRequest(url string) *ApiRequest

func (*ApiRequest) Get Uses

func (r *ApiRequest) Get() *ApiResponse

func (*ApiRequest) PutBool Uses

func (r *ApiRequest) PutBool(key string, value bool)

func (*ApiRequest) PutFloat Uses

func (r *ApiRequest) PutFloat(key string, value float64)

func (*ApiRequest) PutInt Uses

func (r *ApiRequest) PutInt(key string, value int64)

func (*ApiRequest) PutString Uses

func (r *ApiRequest) PutString(key string, value interface{})

func (*ApiRequest) PutStringSlice Uses

func (r *ApiRequest) PutStringSlice(key string, value []string)

type ApiResponse Uses

type ApiResponse struct {
    Success bool
    Message string
}

func NewApiResponse Uses

func NewApiResponse(success bool, message string) *ApiResponse

type Cluster Uses

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

func NewCluster Uses

func NewCluster() *Cluster

func (*Cluster) Add Uses

func (c *Cluster) Add(slave string, task *mesos.TaskInfo)

func (*Cluster) Exists Uses

func (c *Cluster) Exists(slave string) bool

func (*Cluster) GetAllTasks Uses

func (c *Cluster) GetAllTasks() []*mesos.TaskInfo

func (*Cluster) Remove Uses

func (c *Cluster) Remove(slave string)

type Executor Uses

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

func NewExecutor Uses

func NewExecutor(tcpPort int, udpPort int, hostname string) *Executor

func (*Executor) Disconnected Uses

func (e *Executor) Disconnected(executor.ExecutorDriver)

func (*Executor) Error Uses

func (e *Executor) Error(driver executor.ExecutorDriver, message string)

func (*Executor) FrameworkMessage Uses

func (e *Executor) FrameworkMessage(driver executor.ExecutorDriver, message string)

func (*Executor) KillTask Uses

func (e *Executor) KillTask(driver executor.ExecutorDriver, id *mesos.TaskID)

func (*Executor) LaunchTask Uses

func (e *Executor) LaunchTask(driver executor.ExecutorDriver, task *mesos.TaskInfo)

func (*Executor) Registered Uses

func (e *Executor) Registered(driver executor.ExecutorDriver, executor *mesos.ExecutorInfo, framework *mesos.FrameworkInfo, slave *mesos.SlaveInfo)

func (*Executor) Reregistered Uses

func (e *Executor) Reregistered(driver executor.ExecutorDriver, slave *mesos.SlaveInfo)

func (*Executor) Shutdown Uses

func (e *Executor) Shutdown(driver executor.ExecutorDriver)

type HttpServer Uses

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

func NewHttpServer Uses

func NewHttpServer(address string) *HttpServer

func (*HttpServer) Start Uses

func (hs *HttpServer) Start()

type Scheduler Uses

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

func (*Scheduler) Disconnected Uses

func (s *Scheduler) Disconnected(scheduler.SchedulerDriver)

func (*Scheduler) Error Uses

func (s *Scheduler) Error(driver scheduler.SchedulerDriver, message string)

func (*Scheduler) ExecutorLost Uses

func (s *Scheduler) ExecutorLost(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, slave *mesos.SlaveID, status int)

func (*Scheduler) FrameworkMessage Uses

func (s *Scheduler) FrameworkMessage(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, slave *mesos.SlaveID, message string)

func (*Scheduler) OfferRescinded Uses

func (s *Scheduler) OfferRescinded(driver scheduler.SchedulerDriver, id *mesos.OfferID)

func (*Scheduler) Registered Uses

func (s *Scheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, master *mesos.MasterInfo)

func (*Scheduler) Reregistered Uses

func (s *Scheduler) Reregistered(driver scheduler.SchedulerDriver, master *mesos.MasterInfo)

func (*Scheduler) ResourceOffers Uses

func (s *Scheduler) ResourceOffers(driver scheduler.SchedulerDriver, offers []*mesos.Offer)

func (*Scheduler) SetActive Uses

func (s *Scheduler) SetActive(active bool)

func (*Scheduler) Shutdown Uses

func (s *Scheduler) Shutdown(driver *scheduler.MesosSchedulerDriver)

func (*Scheduler) SlaveLost Uses

func (s *Scheduler) SlaveLost(driver scheduler.SchedulerDriver, slave *mesos.SlaveID)

func (*Scheduler) Start Uses

func (s *Scheduler) Start() error

func (*Scheduler) StatusUpdate Uses

func (s *Scheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesos.TaskStatus)

type SyslogMessage Uses

type SyslogMessage struct {
    Message   string
    Hostname  string
    Timestamp int64
}

type SyslogProducer Uses

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

func NewSyslogProducer Uses

func NewSyslogProducer(config *SyslogProducerConfig) *SyslogProducer

func (*SyslogProducer) Start Uses

func (this *SyslogProducer) Start()

func (*SyslogProducer) Stop Uses

func (this *SyslogProducer) Stop()

func (*SyslogProducer) String Uses

func (this *SyslogProducer) String() string

type SyslogProducerConfig Uses

type SyslogProducerConfig struct {
    // Syslog producer config.
    ProducerConfig *producer.ProducerConfig

    // Number of producer instances.
    NumProducers int

    Topic string

    // Receive messages from this TCP address and post them to topic.
    TCPAddr string

    // Receive messages from this UDP address and post them to topic.
    UDPAddr string

    // Kafka Broker List host:port,host:port
    BrokerList string

    // Hostname the message came from
    Hostname string

    Namespace string

    // Transformer func(message syslogparser.LogParts, topic string) *sarama.ProducerMessage
    Transformer func(message *SyslogMessage, topic string) *producer.ProducerRecord

    ValueSerializer producer.Serializer
}

SyslogProducerConfig defines configuration options for SyslogProducer

func NewSyslogProducerConfig Uses

func NewSyslogProducerConfig() *SyslogProducerConfig

Creates an empty SyslogProducerConfig.

Directories

PathSynopsis
avro

Package syslog imports 29 packages (graph) and is imported by 1 packages. Updated 2016-11-10. Refresh now. Tools for package owners.