Documentation
¶
Overview ¶
Package client is a generated GoMock package.
Index ¶
- Variables
- func IsCommandAvailable(cmdName string) bool
- func IsComposeAvailable() bool
- func IsPodmanRootless() bool
- func NewFromConfig(config *baseclient.Config) (*client.ClientWithResponses, error)
- func NewGRPCClientFromConfig(config *baseclient.Config, endpoint string) (grpc_v1.RouterServiceClient, error)
- type AuthInfo
- type Boot
- type Compose
- type Config
- type Enrollment
- type ImageConfig
- type Management
- type MockEnrollment
- func (m *MockEnrollment) CreateEnrollmentRequest(ctx context.Context, req v1alpha1.EnrollmentRequest, ...) (*v1alpha1.EnrollmentRequest, error)
- func (m *MockEnrollment) EXPECT() *MockEnrollmentMockRecorder
- func (m *MockEnrollment) GetEnrollmentRequest(ctx context.Context, id string, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
- func (m *MockEnrollment) SetRPCMetricsCallback(cb func(string, float64, error))
- type MockEnrollmentMockRecorder
- type MockManagement
- func (m *MockManagement) EXPECT() *MockManagementMockRecorder
- func (m *MockManagement) GetRenderedDeviceSpec(ctx context.Context, name string, params *v1alpha1.GetRenderedDeviceSpecParams, ...) (*v1alpha1.RenderedDeviceSpec, int, error)
- func (m *MockManagement) UpdateDeviceStatus(ctx context.Context, name string, device v1alpha1.Device, ...) error
- type MockManagementMockRecorder
- type Podman
- func (p *Podman) Compose() *Compose
- func (p *Podman) Copy(ctx context.Context, src, dst string) error
- func (p *Podman) EventsSinceCmd(ctx context.Context, events []string, sinceTime string) *exec.Cmd
- func (p *Podman) ImageExists(ctx context.Context, image string) bool
- func (p *Podman) Inspect(ctx context.Context, image string) (string, error)
- func (p *Podman) InspectLabels(ctx context.Context, image string) (map[string]string, error)
- func (p *Podman) ListNetworks(ctx context.Context, labels []string) ([]string, error)
- func (p *Podman) Mount(ctx context.Context, image string) (string, error)
- func (p *Podman) Pull(ctx context.Context, image string) (string, error)
- func (p *Podman) RemoveContainer(ctx context.Context, labels []string) error
- func (p *Podman) RemoveNetworks(ctx context.Context, networks ...string) error
- func (p *Podman) RemoveVolumes(ctx context.Context, labels []string) error
- func (p *Podman) StopContainers(ctx context.Context, labels []string) error
- func (p *Podman) Unmount(ctx context.Context, image string) error
- func (p *Podman) Unshare(ctx context.Context, args ...string) (string, error)
- type Service
- type Systemd
- func (s *Systemd) DaemonReload(ctx context.Context) error
- func (s *Systemd) Disable(ctx context.Context, name string) error
- func (s *Systemd) Enable(ctx context.Context, name string) error
- func (s *Systemd) Reload(ctx context.Context, name string) error
- func (s *Systemd) Restart(ctx context.Context, name string) error
- func (s *Systemd) Start(ctx context.Context, name string) error
- func (s *Systemd) Stop(ctx context.Context, name string) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrEmptyResponse = errors.New("empty response")
)
Functions ¶
func IsCommandAvailable ¶ added in v0.3.0
IsCommandAvailable checks if a command is available in the PATH.
func IsComposeAvailable ¶ added in v0.3.0
func IsComposeAvailable() bool
func IsPodmanRootless ¶ added in v0.3.0
func IsPodmanRootless() bool
func NewFromConfig ¶
func NewFromConfig(config *baseclient.Config) (*client.ClientWithResponses, error)
NewFromConfig returns a new FlightCtl API client from the given config.
func NewGRPCClientFromConfig ¶
func NewGRPCClientFromConfig(config *baseclient.Config, endpoint string) (grpc_v1.RouterServiceClient, error)
Types ¶
type AuthInfo ¶
type AuthInfo = baseclient.AuthInfo
type Compose ¶ added in v0.3.0
type Compose struct {
*Podman
}
func (*Compose) UpFromWorkDir ¶ added in v0.3.0
UpFromWorkDir runs `docker-compose up -d` or `podman-compose up -d` from the given workDir. The third argument is a flag to prevent recreation of existing containers.
type Enrollment ¶
type Enrollment interface {
SetRPCMetricsCallback(cb func(operation string, durationSeconds float64, err error))
CreateEnrollmentRequest(ctx context.Context, req v1alpha1.EnrollmentRequest, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
GetEnrollmentRequest(ctx context.Context, id string, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
}
Enrollment is client the interface for managing device enrollment.
func NewEnrollment ¶
func NewEnrollment( client *client.ClientWithResponses, ) Enrollment
type ImageConfig ¶ added in v0.3.0
type Management ¶
type Management interface {
UpdateDeviceStatus(ctx context.Context, name string, device v1alpha1.Device, rcb ...client.RequestEditorFn) error
GetRenderedDeviceSpec(ctx context.Context, name string, params *v1alpha1.GetRenderedDeviceSpecParams, rcb ...client.RequestEditorFn) (*v1alpha1.RenderedDeviceSpec, int, error)
}
Management is the client interface for managing devices.
func NewManagement ¶
func NewManagement( client *client.ClientWithResponses, ) Management
type MockEnrollment ¶
type MockEnrollment struct {
// contains filtered or unexported fields
}
MockEnrollment is a mock of Enrollment interface.
func NewMockEnrollment ¶
func NewMockEnrollment(ctrl *gomock.Controller) *MockEnrollment
NewMockEnrollment creates a new mock instance.
func (*MockEnrollment) CreateEnrollmentRequest ¶
func (m *MockEnrollment) CreateEnrollmentRequest(ctx context.Context, req v1alpha1.EnrollmentRequest, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
CreateEnrollmentRequest mocks base method.
func (*MockEnrollment) EXPECT ¶
func (m *MockEnrollment) EXPECT() *MockEnrollmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEnrollment) GetEnrollmentRequest ¶
func (m *MockEnrollment) GetEnrollmentRequest(ctx context.Context, id string, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
GetEnrollmentRequest mocks base method.
func (*MockEnrollment) SetRPCMetricsCallback ¶
func (m *MockEnrollment) SetRPCMetricsCallback(cb func(string, float64, error))
SetRPCMetricsCallback mocks base method.
type MockEnrollmentMockRecorder ¶
type MockEnrollmentMockRecorder struct {
// contains filtered or unexported fields
}
MockEnrollmentMockRecorder is the mock recorder for MockEnrollment.
func (*MockEnrollmentMockRecorder) CreateEnrollmentRequest ¶
func (mr *MockEnrollmentMockRecorder) CreateEnrollmentRequest(ctx, req any, cb ...any) *gomock.Call
CreateEnrollmentRequest indicates an expected call of CreateEnrollmentRequest.
func (*MockEnrollmentMockRecorder) GetEnrollmentRequest ¶
func (mr *MockEnrollmentMockRecorder) GetEnrollmentRequest(ctx, id any, cb ...any) *gomock.Call
GetEnrollmentRequest indicates an expected call of GetEnrollmentRequest.
func (*MockEnrollmentMockRecorder) SetRPCMetricsCallback ¶
func (mr *MockEnrollmentMockRecorder) SetRPCMetricsCallback(cb any) *gomock.Call
SetRPCMetricsCallback indicates an expected call of SetRPCMetricsCallback.
type MockManagement ¶
type MockManagement struct {
// contains filtered or unexported fields
}
MockManagement is a mock of Management interface.
func NewMockManagement ¶
func NewMockManagement(ctrl *gomock.Controller) *MockManagement
NewMockManagement creates a new mock instance.
func (*MockManagement) EXPECT ¶
func (m *MockManagement) EXPECT() *MockManagementMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManagement) GetRenderedDeviceSpec ¶
func (m *MockManagement) GetRenderedDeviceSpec(ctx context.Context, name string, params *v1alpha1.GetRenderedDeviceSpecParams, rcb ...client.RequestEditorFn) (*v1alpha1.RenderedDeviceSpec, int, error)
GetRenderedDeviceSpec mocks base method.
func (*MockManagement) UpdateDeviceStatus ¶
func (m *MockManagement) UpdateDeviceStatus(ctx context.Context, name string, device v1alpha1.Device, rcb ...client.RequestEditorFn) error
UpdateDeviceStatus mocks base method.
type MockManagementMockRecorder ¶
type MockManagementMockRecorder struct {
// contains filtered or unexported fields
}
MockManagementMockRecorder is the mock recorder for MockManagement.
func (*MockManagementMockRecorder) GetRenderedDeviceSpec ¶
func (mr *MockManagementMockRecorder) GetRenderedDeviceSpec(ctx, name, params any, rcb ...any) *gomock.Call
GetRenderedDeviceSpec indicates an expected call of GetRenderedDeviceSpec.
func (*MockManagementMockRecorder) UpdateDeviceStatus ¶
func (mr *MockManagementMockRecorder) UpdateDeviceStatus(ctx, name, device any, rcb ...any) *gomock.Call
UpdateDeviceStatus indicates an expected call of UpdateDeviceStatus.
type Podman ¶ added in v0.3.0
type Podman struct {
// contains filtered or unexported fields
}
func NewPodman ¶ added in v0.3.0
func NewPodman(log *log.PrefixLogger, exec executer.Executer) *Podman
func (*Podman) EventsSinceCmd ¶ added in v0.3.0
EventsSinceCmd returns a command to get podman events since the given time. After creating the command, it should be started with exec.Start(). When the events are in sync with the current time a sync event is emitted.
func (*Podman) ImageExists ¶ added in v0.3.0
func (*Podman) InspectLabels ¶ added in v0.3.0
func (*Podman) ListNetworks ¶ added in v0.3.0
func (*Podman) RemoveContainer ¶ added in v0.3.0
func (*Podman) RemoveNetworks ¶ added in v0.3.0
func (*Podman) RemoveVolumes ¶ added in v0.3.0
func (*Podman) StopContainers ¶ added in v0.3.0
type Service ¶
type Service = baseclient.Service