beater

package
v6.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

Creates beater

Types

type AMQPProperties

type AMQPProperties struct {
	ContentType     *string    `json:"content_type,omitempty"`     // MIME content type
	ContentEncoding *string    `json:"content_encoding,omitempty"` // MIME content encoding
	DeliveryMode    *int       `json:"delivery_mode,omitempty"`    // queue implementation use - non-persistent (1) or persistent (2)
	Priority        *int       `json:"priority,omitempty"`         // queue implementation use - 0 to 9
	CorrelationID   *string    `json:"correlation_id,omitempty"`   // application use - correlation identifier
	ReplyTo         *string    `json:"reply_to,omitempty"`         // application use - address to to reply to (ex: RPC)
	Expiration      *string    `json:"expiration,omitempty"`       // implementation use - message expiration spec
	MessageID       *string    `json:"message_id,omitempty"`       // application use - message identifier
	Timestamp       *time.Time `json:"timestamp,omitempty"`        // application use - message timestamp
	Type            *string    `json:"type,omitempty"`             // application use - message type name
	UserID          *string    `json:"user_id,omitempty"`          // application use - creating user - should be authenticated user
	AppID           *string    `json:"app_id,omitempty"`           // application use - creating application id
}

AMQPProperties represents AMQP message properties

type Consumer

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

Consumer is a basic AMQP message receiver, that publishes received message to configured outputs

func NewConsumer

func NewConsumer(cfg *common.Config, client beat.Client, name string, version string) *Consumer

NewConsumer creates a consumer from configuration

func (*Consumer) Connect

func (c *Consumer) Connect()

Connect starts connection to AMQP

func (*Consumer) Shutdown

func (c *Consumer) Shutdown() error

Shutdown cancels consumer and closes connection

type Payload

type Payload struct {
	Size      int         `json:"size,omitempty"`
	Body      string      `json:"body,omitempty"`
	Json      interface{} `json:"json,omitempty"`
	Type      *string     `json:"type,omitempty"`
	Timestamp *time.Time  `json:"timestamp,omitempty"`
}

Payload is a container for message payload

type RabbitMQEvent

type RabbitMQEvent struct {
	Properties   AMQPProperties         `json:"properties"`
	Headers      map[string]interface{} `json:"headers"`
	Action       string                 `json:"action"`
	Exchange     string                 `json:"exchange"`
	RoutingKey   string                 `json:"routing_key"`
	Queue        *string                `json:"queue"`
	ConsumerTag  *string                `json:"consumer_tag"`
	Connection   *string                `json:"connection,omitempty"`
	Channel      *int                   `json:"channel,omitempty"`
	User         *string                `json:"user,omitempty"`
	RoutedQueues *[]string              `json:"routed_queues,omitempty"`
	Redelivered  bool                   `json:"redelivered"`
	Payload      Payload                `json:"payload"`
}

RabbitMQEvent contains information about a single AMQP message (or event relating to the message in tracer mode)

type Rmqbeat

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

func (*Rmqbeat) Run

func (bt *Rmqbeat) Run(b *beat.Beat) error

func (*Rmqbeat) Stop

func (bt *Rmqbeat) Stop()

Jump to

Keyboard shortcuts

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