status

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphQLClient

type GraphQLClient interface {
	Client() *graphql.Client
	DeploymentID() string
}

GraphQLClient defines GraphQL client.

type GraphQLStatusReporter

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

GraphQLStatusReporter reports status to GraphQL server.

func (*GraphQLStatusReporter) ReportDeploymentConnectionInit added in v1.4.1

func (r *GraphQLStatusReporter) ReportDeploymentConnectionInit(ctx context.Context, k8sVer string) error

ReportDeploymentConnectionInit reports connection initialization.

func (*GraphQLStatusReporter) ReportDeploymentFailure

func (r *GraphQLStatusReporter) ReportDeploymentFailure(ctx context.Context, errMsg string) error

ReportDeploymentFailure reports deployment failure to GraphQL server.

func (*GraphQLStatusReporter) ReportDeploymentShutdown

func (r *GraphQLStatusReporter) ReportDeploymentShutdown(ctx context.Context) error

ReportDeploymentShutdown reports deployment shutdown to GraphQL server.

func (*GraphQLStatusReporter) ReportDeploymentStartup

func (r *GraphQLStatusReporter) ReportDeploymentStartup(ctx context.Context) error

ReportDeploymentStartup reports deployment startup to GraphQL server.

func (*GraphQLStatusReporter) SetLogger added in v1.4.1

func (r *GraphQLStatusReporter) SetLogger(logger logrus.FieldLogger)

func (*GraphQLStatusReporter) SetResourceVersion

func (r *GraphQLStatusReporter) SetResourceVersion(resourceVersion int)

SetResourceVersion sets resource version.

type NoopStatusReporter

type NoopStatusReporter struct{}

func (NoopStatusReporter) ReportDeploymentConnectionInit added in v1.4.1

func (n NoopStatusReporter) ReportDeploymentConnectionInit(context.Context, string) error

func (NoopStatusReporter) ReportDeploymentFailure

func (n NoopStatusReporter) ReportDeploymentFailure(context.Context, string) error

func (NoopStatusReporter) ReportDeploymentShutdown

func (n NoopStatusReporter) ReportDeploymentShutdown(context.Context) error

func (NoopStatusReporter) ReportDeploymentStartup

func (n NoopStatusReporter) ReportDeploymentStartup(context.Context) error

func (NoopStatusReporter) SetLogger added in v1.4.1

func (n NoopStatusReporter) SetLogger(logrus.FieldLogger)

func (NoopStatusReporter) SetResourceVersion

func (n NoopStatusReporter) SetResourceVersion(int)

type ResVerClient

type ResVerClient interface {
	GetResourceVersion(ctx context.Context) (int, error)
}

ResVerClient defines client for getting resource version.

type StatusReporter

type StatusReporter interface {
	ReportDeploymentConnectionInit(ctx context.Context, k8sVer string) error
	ReportDeploymentStartup(ctx context.Context) error
	ReportDeploymentShutdown(ctx context.Context) error
	ReportDeploymentFailure(ctx context.Context, errMsg string) error
	SetResourceVersion(resourceVersion int)
	SetLogger(logger logrus.FieldLogger)
}

func GetReporter

func GetReporter(remoteCfgEnabled bool, gql GraphQLClient, resVerClient ResVerClient, log logrus.FieldLogger) StatusReporter

Jump to

Keyboard shortcuts

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