manager

package
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DisplayName                   = "OSS Traffic Manager"               //nolint:gochecknoglobals // extension point
	NewServiceFunc                = NewService                          //nolint:gochecknoglobals // extension point
	WithAgentImageRetrieverFunc   = managerutil.WithAgentImageRetriever //nolint:gochecknoglobals // extension point
	IncrementInterceptCounterFunc = func(metric *prometheus.CounterVec, client, installId string, spec *rpc.InterceptSpec) {
		if metric != nil {
			labels := prometheus.Labels{
				"client":         client,
				"install_id":     installId,
				"intercept_type": "global",
			}

			metric.With(labels).Inc()
		}
	}
)

Functions

func IncrementCounter added in v2.17.0

func IncrementCounter(metric *prometheus.CounterVec, client, installId string)

func Main

func Main(ctx context.Context, _ ...string) error

Main starts up the traffic manager and blocks until it ends.

func MainWithEnv added in v2.14.1

func MainWithEnv(ctx context.Context) error

func SetGauge added in v2.17.0

func SetGauge(metric *prometheus.GaugeVec, client, installId string, workload *string, value float64)

Types

type Clock

type Clock interface {
	Now() time.Time
}

Clock is the mechanism used by the Manager state to get the current time.

type HealthChecker

type HealthChecker struct{}

type Service added in v2.10.0

type Service interface {
	rpc.ManagerServer
	ID() string
	InstallID() string
	ClusterID() string
	MakeInterceptID(context.Context, string, string) (string, error)
	RegisterServers(*grpc.Server)
	State() state.State
	ClusterInfo() cluster.Info
	// contains filtered or unexported methods
}

func NewService added in v2.10.0

func NewService(ctx context.Context) (Service, *dgroup.Group, error)

Directories

Path Synopsis
mocks
Package mock_kubernetes is a generated GoMock package.
Package mock_kubernetes is a generated GoMock package.

Jump to

Keyboard shortcuts

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