observer

package
v0.0.0-...-21d19b4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, log *logrus.Logger, dir, address string, rateAdjustment int, withTLSPath *TLSPaths, fatal chan<- error)

Run sets up mock-hubble server in an opinionated way, it's very suitable for most use-cases.

Types

type Observer

type Observer struct {

	// UnimplementedObserverServer is embedded for forward compatibility.
	observer.UnimplementedObserverServer
	// contains filtered or unexported fields
}

Observer implement Hubble's ObserverServer

func New

func New(log logrus.FieldLogger, options ...Option) (*Observer, error)

New create and return a new Observer that can be used as a Hubble Observer service.

func (*Observer) GetFlows

GetFlows implements ObserverServer for the Observer struct.

func (*Observer) ServerStatus

ServerStatus implements ObserverServer for the Observer struct.

type Option

type Option func(o *Options) error

Option customizes then configuration of the mock observer.

func WithRateAdjustment

func WithRateAdjustment(n int64) Option

func WithSampleDir

func WithSampleDir(d string) Option

type Options

type Options struct {
	RateAdjustment int64
	SampleDir      string
}

Options stores all the configuration values for the mock observer.

type TLSPaths

type TLSPaths struct {
	Certificate, Key, CertificateAuthority string
}

TLSPaths allows passing TLS certificate files to Run.

Jump to

Keyboard shortcuts

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