status

package
v1.0.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 9 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) 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) SetResourceVersion

func (r *GraphQLStatusReporter) SetResourceVersion(resourceVersion int)

SetResourceVersion sets resource version.

type NoopStatusReporter

type NoopStatusReporter struct{}

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) 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 {
	ReportDeploymentStartup(ctx context.Context) error
	ReportDeploymentShutdown(ctx context.Context) error
	ReportDeploymentFailure(ctx context.Context, errMsg string) error
	SetResourceVersion(resourceVersion int)
}

func GetReporter

func GetReporter(remoteCfgEnabled bool, logger logrus.FieldLogger, gql GraphQLClient, resVerClient ResVerClient, cfgVersion int) StatusReporter

Jump to

Keyboard shortcuts

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