publisher

package
v0.0.0-...-c7c381b Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(options *publishOptions)

Confirm option will block the event publisher until event has been send and ACKed by output plugin or fail is reported.

func PrintPublishEvent

func PrintPublishEvent(event common.MapStr)

func Sync

func Sync(options *publishOptions)

Sync option will block the event publisher until an event has been ACKed by the output plugin. If output plugin signals failure, the client will retry until success is signaled.

Types

type ChanClient

type ChanClient struct {
	Channel chan common.MapStr
}

ChanClient will forward all published events one by one to the given channel

func (ChanClient) PublishEvent

func (c ChanClient) PublishEvent(event common.MapStr, opts ...ClientOption) bool

PublishEvent will publish the event on the channel. Options will be ignored. Always returns true.

func (ChanClient) PublishEvents

func (c ChanClient) PublishEvents(events []common.MapStr, opts ...ClientOption) bool

PublishEvents publishes all event on the configured channel. Options will be ignored. Always returns true.

type Client

type Client interface {
	// PublishEvent publishes one event with given options. If Confirm option is set,
	// PublishEvent will block until output plugins report success or failure state
	// being returned by this method.
	PublishEvent(event common.MapStr, opts ...ClientOption) bool

	// PublishEvents publishes multiple events with given options. If Confirm
	// option is set, PublishEvent will block until output plugins report
	// success or failure state being returned by this method.
	PublishEvents(events []common.MapStr, opts ...ClientOption) bool
}

Client is used by beats to publish new events.

type ClientOption

type ClientOption func(option *publishOptions)

ClientOption allows API users to set additional options when publishing events.

type PublisherType

type PublisherType struct {
	Index          string
	Output         []*outputWorker
	TopologyOutput outputs.TopologyOutputer
	IgnoreOutgoing bool
	GeoLite        *libgeo.GeoIP

	RefreshTopologyTimer <-chan time.Time
	// contains filtered or unexported fields
}
var Publisher PublisherType

func (*PublisherType) Client

func (publisher *PublisherType) Client() Client

func (*PublisherType) GetServerName

func (publisher *PublisherType) GetServerName(ip string) string

func (*PublisherType) Init

func (publisher *PublisherType) Init(
	beatName string,
	configs map[string]outputs.MothershipConfig,
	shipper ShipperConfig,
) error

func (*PublisherType) IsPublisherIP

func (publisher *PublisherType) IsPublisherIP(ip string) bool

func (*PublisherType) PublishTopology

func (publisher *PublisherType) PublishTopology(params ...string) error

func (*PublisherType) UpdateTopologyPeriodically

func (publisher *PublisherType) UpdateTopologyPeriodically()

type ShipperConfig

type ShipperConfig struct {
	Name                  string
	Refresh_topology_freq int
	Ignore_outgoing       bool
	Topology_expire       int
	Tags                  []string
	Geoip                 common.Geoip
}

type Topology

type Topology struct {
	Name string `json:"name"`
	Ip   string `json:"ip"`
}

type TransactionalEventPublisher

type TransactionalEventPublisher interface {
	PublishTransaction(transaction outputs.Signaler, events []common.MapStr)
}

Jump to

Keyboard shortcuts

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