events

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConsumerCluster

func CreateConsumerCluster(kafkaAddrs []string, kafkaGroup string) *kafka.Consumer

func CreateProducer

func CreateProducer(kafkaAddrs []string, kafkaGroup string) *kafka.Producer

Types

type DockerSpec

type DockerSpec struct {
	ContainerId string `json:"container_id"`
}

type KubernetesSpec

type KubernetesSpec struct {
	NamespaceName string     `json:"namespace_name"`
	PodId         string     `json:"pod_id"`
	PodName       string     `json:"pod_name"`
	ContainerName string     `json:"container_name"`
	Labels        LabelsSpec `json:"labels"`
	Host          string     `json:"host"`
}

type LabelsSpec

type LabelsSpec struct {
	Name            string `json:"name"`
	PodTemplateHash string `json:"pod-template-hash"`
}

type LogConsumer

type LogConsumer struct {
	AppLogs      chan *kafka.Message
	BuildLogs    chan *kafka.Message
	WebLogs      chan *kafka.Message
	IstioWebLogs chan *kafka.Message
	IsOpen       bool
	// contains filtered or unexported fields
}

func (*LogConsumer) Close

func (lc *LogConsumer) Close()

func (*LogConsumer) Init

func (lc *LogConsumer) Init(kafkaAddrs []string, kafkaGroup string)

func (*LogConsumer) MarkOffset

func (lc *LogConsumer) MarkOffset(msg *kafka.Message)

func (*LogConsumer) Open

func (lc *LogConsumer) Open() error

func (*LogConsumer) Refresh

func (lc *LogConsumer) Refresh() error

type LogProducer

type LogProducer struct {
	IsOpen bool
	// contains filtered or unexported fields
}

func (*LogProducer) AddLog

func (lc *LogProducer) AddLog(message LogSpec) error

func (*LogProducer) AddRaw added in v1.0.3

func (lc *LogProducer) AddRaw(topic string, message string) error

func (*LogProducer) Close

func (lc *LogProducer) Close()

func (*LogProducer) Init

func (lc *LogProducer) Init(kafkaAddrs []string, kafkaGroup string) error

func (*LogProducer) Open

func (lc *LogProducer) Open() error

type LogSpec

type LogSpec struct {
	Log        string         `json:"log"`
	Stream     string         `json:"stream"`
	Time       time.Time      `json:"time"`
	Space      string         `json:"space"`
	Docker     DockerSpec     `json:"docker"`
	Kubernetes KubernetesSpec `json:"kubernetes"`
	Topic      string         `json:"topic"`
	Tag        string         `json:"tag"`
	Site       string         `json:"site,omitempty"`
	SitePath   string         `json:"site,omitempty"`
	Path       string         `json:"site,omitempty"`
}

type Process

type Process struct {
	App  string `json:"app"`
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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