remote

package
v1.25.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterError

func ClusterError(err error) error

func Instrument

func Instrument(s api.Server) *instrumentedServer

func ServerTestBattery

func ServerTestBattery(t *testing.T, wrap func(mock api.Server) api.Server)

func UnavailableError

func UnavailableError(err error) error

func UnsupportedResourceKind

func UnsupportedResourceKind(err error) error

func UpgradeNeededError

func UpgradeNeededError(err error) error

Types

type ErrorLoggingServer

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

func NewErrorLoggingServer

func NewErrorLoggingServer(s api.Server, l log.Logger) *ErrorLoggingServer

func (*ErrorLoggingServer) Export

func (p *ErrorLoggingServer) Export(ctx context.Context) (config []byte, err error)

func (*ErrorLoggingServer) GitRepoConfig

func (p *ErrorLoggingServer) GitRepoConfig(ctx context.Context, regenerate bool) (_ v6.GitConfig, err error)

func (*ErrorLoggingServer) JobStatus

func (p *ErrorLoggingServer) JobStatus(ctx context.Context, jobID job.ID) (_ job.Status, err error)

func (*ErrorLoggingServer) ListImages

func (p *ErrorLoggingServer) ListImages(ctx context.Context, spec update.ResourceSpec) (_ []v6.ImageStatus, err error)

func (*ErrorLoggingServer) ListImagesWithOptions

func (p *ErrorLoggingServer) ListImagesWithOptions(ctx context.Context, opts v10.ListImagesOptions) (_ []v6.ImageStatus, err error)

func (*ErrorLoggingServer) ListServices

func (p *ErrorLoggingServer) ListServices(ctx context.Context, maybeNamespace string) (_ []v6.ControllerStatus, err error)

func (*ErrorLoggingServer) ListServicesWithOptions

func (p *ErrorLoggingServer) ListServicesWithOptions(ctx context.Context, opts v11.ListServicesOptions) (_ []v6.ControllerStatus, err error)

func (*ErrorLoggingServer) NotifyChange

func (p *ErrorLoggingServer) NotifyChange(ctx context.Context, change v9.Change) (err error)

func (*ErrorLoggingServer) Ping

func (p *ErrorLoggingServer) Ping(ctx context.Context) (err error)

func (*ErrorLoggingServer) SyncStatus

func (p *ErrorLoggingServer) SyncStatus(ctx context.Context, ref string) (_ []string, err error)

func (*ErrorLoggingServer) UpdateManifests

func (p *ErrorLoggingServer) UpdateManifests(ctx context.Context, u update.Spec) (_ job.ID, err error)

func (*ErrorLoggingServer) Version

func (p *ErrorLoggingServer) Version(ctx context.Context) (v string, err error)

type FatalError

type FatalError struct {
	Err error
}

Wrap errors in this to indicate that the server should be considered dead, and disconnected.

func (FatalError) Error

func (err FatalError) Error() string

type MockServer

type MockServer struct {
	PingError error

	VersionAnswer string
	VersionError  error

	ExportAnswer []byte
	ExportError  error

	ListServicesAnswer []v6.ControllerStatus
	ListServicesError  error

	ListImagesAnswer []v6.ImageStatus
	ListImagesError  error

	UpdateManifestsArgTest func(update.Spec) error
	UpdateManifestsAnswer  job.ID
	UpdateManifestsError   error

	NotifyChangeError error

	SyncStatusAnswer []string
	SyncStatusError  error

	JobStatusAnswer job.Status
	JobStatusError  error

	GitRepoConfigAnswer v6.GitConfig
	GitRepoConfigError  error
}

func (*MockServer) Export

func (p *MockServer) Export(ctx context.Context) ([]byte, error)

func (*MockServer) GitRepoConfig

func (p *MockServer) GitRepoConfig(ctx context.Context, regenerate bool) (v6.GitConfig, error)

func (*MockServer) JobStatus

func (p *MockServer) JobStatus(context.Context, job.ID) (job.Status, error)

func (*MockServer) ListImages

func (*MockServer) ListImagesWithOptions

func (p *MockServer) ListImagesWithOptions(context.Context, v10.ListImagesOptions) ([]v6.ImageStatus, error)

func (*MockServer) ListServices

func (p *MockServer) ListServices(ctx context.Context, ns string) ([]v6.ControllerStatus, error)

func (*MockServer) ListServicesWithOptions

func (p *MockServer) ListServicesWithOptions(context.Context, v11.ListServicesOptions) ([]v6.ControllerStatus, error)

func (*MockServer) NotifyChange

func (p *MockServer) NotifyChange(ctx context.Context, change v9.Change) error

func (*MockServer) Ping

func (p *MockServer) Ping(ctx context.Context) error

func (*MockServer) SyncStatus

func (p *MockServer) SyncStatus(context.Context, string) ([]string, error)

func (*MockServer) UpdateManifests

func (p *MockServer) UpdateManifests(ctx context.Context, s update.Spec) (job.ID, error)

func (*MockServer) Version

func (p *MockServer) Version(ctx context.Context) (string, error)

Directories

Path Synopsis
This is a `net/rpc`-compatible implementation of a client and server for `flux/api.Server`.
This is a `net/rpc`-compatible implementation of a client and server for `flux/api.Server`.

Jump to

Keyboard shortcuts

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