server

package
v0.0.0-...-2bc910a Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBigQuerySink

func NewBigQuerySink(config BigQueryConfig) (*bigQuerySink, error)

NewBigQuerySink returns a new Google BigQuery events sink

func NewChannelSink

func NewChannelSink(ch chan types.Event) *chanSink

NewChannelSink returns a new sink that submits events into the provided channel

func NewLogSink

func NewLogSink() *logSink

NewLogSink returns a new sink that just logs events

func NewServer

func NewServer(config ServerConfig) *server

NewServer returns a new reporting gRPC server

Types

type BigQueryConfig

type BigQueryConfig struct {
	// ProjectID is the GCP project ID. Note that proper authentication should
	// be setup as described in
	// https://cloud.google.com/docs/authentication/getting-started
	ProjectID string `json:"projectID"`
}

BigQueryConfig is config for Google BigQuery sink

func (BigQueryConfig) Check

func (c BigQueryConfig) Check() error

Check makes sure that BigQuery sink config is valid

type ServerConfig

type ServerConfig struct {
	// Sinks is the list of event sinks
	Sinks []Sink
}

ServerConfig defines the reporting server config

type Sink

type Sink interface {
	// Put saves a series of events
	Put([]types.Event) error
}

Sink defines an event sink interface

Jump to

Keyboard shortcuts

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