collector

package
v0.0.0-...-ef9407b Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicNameNode         = "/cluster/nodes"
	TopicNameClient       = "/cluster/clients"
	TopicNameSession      = "/cluster/sessions"
	TopicNameSubscription = "/cluster/subscriptions"
	TopicNamePublish      = "/cluster/publish"
	TopicNameMetric       = "/cluster/metrics"
	TopicNameStats        = "/cluster/stats"
)
View Source
const (
	ObjectActionRegister   = "register"
	ObjectActionUnregister = "unregister"
	ObjectActionRetrieve   = "retrieve"
	ObjectActionDelete     = "delete"
	ObjectActionUpdate     = "update"
)

Variables

View Source
var Configs = map[string]string{}

Functions

func AsyncReport

func AsyncReport(c core.Config, topic string, value sarama.Encoder) error

func SyncReport

func SyncReport(c core.Config, topic string, value sarama.Encoder) error

Types

type Client

type Client struct {
	ClientId        string `json:"clientId"`
	UserName        string `json:"userName"`
	IpAddress       string `json:"ipAddress"`
	Port            uint16 `json:"port"`
	CleanSession    bool   `json:"cleanSession"`
	ProtocolVersion string `json:"protocolVersion"`
	Keepalive       uint16 `json:"keepalive"`
	ConnectedAt     string `json:"connectedAt"`
	// contains filtered or unexported fields
}

Client

func (*Client) Encode

func (p *Client) Encode() ([]byte, error)

func (*Client) Length

func (p *Client) Length() int

type CollectorService

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

func (*CollectorService) Name

func (s *CollectorService) Name() string

Name

func (*CollectorService) Start

func (s *CollectorService) Start() error

Start

func (*CollectorService) Stop

func (s *CollectorService) Stop()

Stop

type CollectorServiceFactory

type CollectorServiceFactory struct{}

CollectorServiceFactory

func (*CollectorServiceFactory) New

New create apiService service factory

type Metric

type Metric struct {
	Action     string            `json:"action"`
	NodeName   string            `json:"nodeName"`
	Service    string            `json:"service"`
	Values     map[string]uint64 `json:"values"`
	UpdateTime time.Time         `json:"updateTime"`
	// contains filtered or unexported fields
}

Metric

func (*Metric) Encode

func (p *Metric) Encode() ([]byte, error)

func (*Metric) Length

func (p *Metric) Length() int

type Node

type Node struct {
	NodeName   string `json:"nodeName"`
	NodeIp     string `json:"nodeIp"`
	Version    string `json:"version"`
	CreatedAt  string `json:"createdAt"`
	NodeStatus string `json:"nodeStatus"`
	Action     string `json:"action"`
	// contains filtered or unexported fields
}

Node

func (*Node) Encode

func (p *Node) Encode() ([]byte, error)

func (*Node) Length

func (p *Node) Length() int

type Publish

type Publish struct {
	ClientId  string `json:"clientId"`
	Topic     string `json:"topic"`
	ProductId string `json:"product"`
	// contains filtered or unexported fields
}

Publish

func (*Publish) Encode

func (p *Publish) Encode() ([]byte, error)

func (*Publish) Length

func (p *Publish) Length() int

type Session

type Session struct {
	Action             string `json:"action"`
	ClientId           string `json:"clientId"`
	CleanSession       bool   `json:"cleanSession"`
	MessageMaxInflight uint64 `json:"messageMaxInflight"`
	MessageInflight    uint64 `json:"messageInflight"`
	MessageInQueue     uint64 `json:"messageInQueue"`
	MessageDropped     uint64 `json:"messageDropped"`
	AwaitingRel        uint64 `json:"awaitingRel"`
	AwaitingComp       uint64 `json:"awaitingComp"`
	AwaitingAck        uint64 `json:"awaitingAck"`
	CreatedAt          string `json:"createdAt"`
	// contains filtered or unexported fields
}

Session

func (*Session) Encode

func (p *Session) Encode() ([]byte, error)

func (*Session) Length

func (p *Session) Length() int

type Stats

type Stats struct {
	NodeName   string            `json:"nodeName"`
	Service    string            `json:"service"`
	Action     string            `json:"action"`
	UpdateTime time.Time         `json:"updateTime"`
	Values     map[string]uint64 `json:"values"`
	// contains filtered or unexported fields
}

Stat

func (*Stats) Encode

func (p *Stats) Encode() ([]byte, error)

func (*Stats) Length

func (p *Stats) Length() int

type Subscription

type Subscription struct {
	ClientId  string    `json:"clientId"`
	Topic     string    `json:"topic"`
	Qos       int       `json:"qos"`
	CreatedAt time.Time `json:"createdAt"`
	Action    string    `json:"action"`
	// contains filtered or unexported fields
}

Subscription

func (*Subscription) Encode

func (p *Subscription) Encode() ([]byte, error)

func (*Subscription) Length

func (p *Subscription) Length() int

Jump to

Keyboard shortcuts

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