Documentation ¶
Index ¶
- Constants
- Variables
- func InitLogging(level string) error
- type ApiRequest
- func (r *ApiRequest) Get() *ApiResponse
- func (r *ApiRequest) PutBool(key string, value bool)
- func (r *ApiRequest) PutFloat(key string, value float64)
- func (r *ApiRequest) PutInt(key string, value int64)
- func (r *ApiRequest) PutString(key string, value interface{})
- func (r *ApiRequest) PutStringSlice(key string, value []string)
- type ApiResponse
- type Cluster
- type Executor
- func (e *Executor) Disconnected(executor.ExecutorDriver)
- func (e *Executor) Error(driver executor.ExecutorDriver, message string)
- func (e *Executor) FrameworkMessage(driver executor.ExecutorDriver, message string)
- func (e *Executor) KillTask(driver executor.ExecutorDriver, id *mesos.TaskID)
- func (e *Executor) LaunchTask(driver executor.ExecutorDriver, task *mesos.TaskInfo)
- func (e *Executor) Registered(driver executor.ExecutorDriver, executor *mesos.ExecutorInfo, ...)
- func (e *Executor) Reregistered(driver executor.ExecutorDriver, slave *mesos.SlaveInfo)
- func (e *Executor) Shutdown(driver executor.ExecutorDriver)
- type HttpServer
- type Scheduler
- func (s *Scheduler) Disconnected(scheduler.SchedulerDriver)
- func (s *Scheduler) Error(driver scheduler.SchedulerDriver, message string)
- func (s *Scheduler) ExecutorLost(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, ...)
- func (s *Scheduler) FrameworkMessage(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, ...)
- func (s *Scheduler) OfferRescinded(driver scheduler.SchedulerDriver, id *mesos.OfferID)
- func (s *Scheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, ...)
- func (s *Scheduler) Reregistered(driver scheduler.SchedulerDriver, master *mesos.MasterInfo)
- func (s *Scheduler) ResourceOffers(driver scheduler.SchedulerDriver, offers []*mesos.Offer)
- func (s *Scheduler) SetActive(active bool)
- func (s *Scheduler) Shutdown(driver *scheduler.MesosSchedulerDriver)
- func (s *Scheduler) SlaveLost(driver scheduler.SchedulerDriver, slave *mesos.SlaveID)
- func (s *Scheduler) Start() error
- func (s *Scheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesos.TaskStatus)
- type SyslogMessage
- type SyslogProducer
- type SyslogProducerConfig
Constants ¶
View Source
const ( TransformNone = "none" TransformAvro = "avro" )
Variables ¶
View Source
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",
}
View Source
var Logger log.LoggerInterface
Functions ¶
func InitLogging ¶
Types ¶
type ApiRequest ¶
type ApiRequest struct {
// contains filtered or unexported fields
}
func NewApiRequest ¶
func NewApiRequest(url string) *ApiRequest
func (*ApiRequest) Get ¶
func (r *ApiRequest) Get() *ApiResponse
func (*ApiRequest) PutBool ¶
func (r *ApiRequest) PutBool(key string, value bool)
func (*ApiRequest) PutFloat ¶
func (r *ApiRequest) PutFloat(key string, value float64)
func (*ApiRequest) PutInt ¶
func (r *ApiRequest) PutInt(key string, value int64)
func (*ApiRequest) PutString ¶
func (r *ApiRequest) PutString(key string, value interface{})
func (*ApiRequest) PutStringSlice ¶
func (r *ApiRequest) PutStringSlice(key string, value []string)
type ApiResponse ¶
func NewApiResponse ¶
func NewApiResponse(success bool, message string) *ApiResponse
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func NewCluster() *Cluster
func (*Cluster) GetAllTasks ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func (*Executor) Disconnected ¶
func (e *Executor) Disconnected(executor.ExecutorDriver)
func (*Executor) FrameworkMessage ¶
func (e *Executor) FrameworkMessage(driver executor.ExecutorDriver, message string)
func (*Executor) KillTask ¶
func (e *Executor) KillTask(driver executor.ExecutorDriver, id *mesos.TaskID)
func (*Executor) LaunchTask ¶
func (e *Executor) LaunchTask(driver executor.ExecutorDriver, task *mesos.TaskInfo)
func (*Executor) Registered ¶
func (e *Executor) Registered(driver executor.ExecutorDriver, executor *mesos.ExecutorInfo, framework *mesos.FrameworkInfo, slave *mesos.SlaveInfo)
func (*Executor) Reregistered ¶
func (e *Executor) Reregistered(driver executor.ExecutorDriver, slave *mesos.SlaveInfo)
func (*Executor) Shutdown ¶
func (e *Executor) Shutdown(driver executor.ExecutorDriver)
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(address string) *HttpServer
func (*HttpServer) Start ¶
func (hs *HttpServer) Start()
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) Disconnected ¶
func (s *Scheduler) Disconnected(scheduler.SchedulerDriver)
func (*Scheduler) Error ¶
func (s *Scheduler) Error(driver scheduler.SchedulerDriver, message string)
func (*Scheduler) ExecutorLost ¶
func (s *Scheduler) ExecutorLost(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, slave *mesos.SlaveID, status int)
func (*Scheduler) FrameworkMessage ¶
func (s *Scheduler) FrameworkMessage(driver scheduler.SchedulerDriver, executor *mesos.ExecutorID, slave *mesos.SlaveID, message string)
func (*Scheduler) OfferRescinded ¶
func (s *Scheduler) OfferRescinded(driver scheduler.SchedulerDriver, id *mesos.OfferID)
func (*Scheduler) Registered ¶
func (s *Scheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, master *mesos.MasterInfo)
func (*Scheduler) Reregistered ¶
func (s *Scheduler) Reregistered(driver scheduler.SchedulerDriver, master *mesos.MasterInfo)
func (*Scheduler) ResourceOffers ¶
func (s *Scheduler) ResourceOffers(driver scheduler.SchedulerDriver, offers []*mesos.Offer)
func (*Scheduler) Shutdown ¶
func (s *Scheduler) Shutdown(driver *scheduler.MesosSchedulerDriver)
func (*Scheduler) SlaveLost ¶
func (s *Scheduler) SlaveLost(driver scheduler.SchedulerDriver, slave *mesos.SlaveID)
func (*Scheduler) StatusUpdate ¶
func (s *Scheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesos.TaskStatus)
type SyslogMessage ¶
type SyslogProducer ¶
type SyslogProducer struct {
// contains filtered or unexported fields
}
func NewSyslogProducer ¶
func NewSyslogProducer(config *SyslogProducerConfig) *SyslogProducer
func (*SyslogProducer) Start ¶
func (this *SyslogProducer) Start()
func (*SyslogProducer) Stop ¶
func (this *SyslogProducer) Stop()
func (*SyslogProducer) String ¶
func (this *SyslogProducer) String() string
type SyslogProducerConfig ¶
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 ¶
func NewSyslogProducerConfig() *SyslogProducerConfig
Creates an empty SyslogProducerConfig.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.