Documentation
¶
Overview ¶
SnapshotClient — typed wrapper around generated.SnapshotServiceClient. RUNE-071.
Package client — StorageClassClient gRPC wrapper.
VolumeClient — typed wrapper around generated.VolumeServiceClient. RUNE-072.
Index ¶
- func NamespaceToProto(namespace *types.Namespace) *generated.Namespace
- func ProtoToNamespace(proto *generated.Namespace) (*types.Namespace, error)
- func ProtoToService(proto *generated.Service) (*types.Service, error)
- func ProtoToSnapshot(p *generated.Snapshot) *types.Snapshot
- func ProtoToStorageClass(p *generated.StorageClass) *types.StorageClass
- func ProtoToVolume(p *generated.Volume) *types.Volume
- func ServiceToProto(service *types.Service) *generated.Service
- func SnapshotToProto(s *types.Snapshot) *generated.Snapshot
- func StorageClassToProto(sc *types.StorageClass) *generated.StorageClass
- func VolumeToProto(v *types.Volume) *generated.Volume
- type AuditClient
- type AuditListOptions
- type Client
- type ClientOptions
- type ConfigmapClient
- func (c *ConfigmapClient) CreateConfigmap(configmap *types.Configmap, ensureNamespace bool) error
- func (c *ConfigmapClient) DeleteConfigmap(namespace, name string) error
- func (c *ConfigmapClient) GetConfigmap(namespace, name string) (*types.Configmap, error)
- func (c *ConfigmapClient) GetLogger() log.Logger
- func (c *ConfigmapClient) ListConfigmaps(namespace string, labelSelector string, fieldSelector string) ([]*types.Configmap, error)
- func (c *ConfigmapClient) UpdateConfigmap(configmap *types.Configmap) error
- type ExecClient
- type ExecOptions
- type ExecSession
- func (s *ExecSession) Close() error
- func (s *ExecSession) InitializeInstanceTarget(target string, namespace string, options *ExecOptions) error
- func (s *ExecSession) InitializeServiceTarget(target string, namespace string, options *ExecOptions) error
- func (s *ExecSession) RunInteractive() error
- func (s *ExecSession) RunNonInteractive() error
- type HealthClient
- type InstanceClient
- func (i *InstanceClient) GetInstance(namespace, id string) (*types.Instance, error)
- func (i *InstanceClient) ListInstances(namespace, serviceID, labelSelector, fieldSelector string) ([]*types.Instance, error)
- func (i *InstanceClient) RestartInstance(namespace, id string, timeout time.Duration) error
- func (i *InstanceClient) StartInstance(namespace, id string) error
- func (i *InstanceClient) StopInstance(namespace, id string, timeout time.Duration) error
- func (i *InstanceClient) WatchInstances(namespace, serviceID, labelSelector, fieldSelector string) (<-chan InstanceWatchEvent, error)
- type InstanceWatchEvent
- type LogClient
- type NamespaceClient
- func (n *NamespaceClient) CreateNamespace(namespace *types.Namespace) error
- func (n *NamespaceClient) DeleteNamespace(name string, ignoreNotFound, force bool) error
- func (n *NamespaceClient) GetLogger() log.Logger
- func (n *NamespaceClient) GetNamespace(name string) (*types.Namespace, error)
- func (n *NamespaceClient) ListNamespaces(labelSelector, fieldSelector map[string]string) ([]*types.Namespace, error)
- func (n *NamespaceClient) WatchNamespaces(labelSelector, fieldSelector map[string]string) (<-chan *types.Namespace, error)
- type PortForwardClient
- type PortForwardReady
- type PortForwardSession
- func (s *PortForwardSession) Close() error
- func (s *PortForwardSession) Recv() (*generated.PortForwardServerMessage, error)
- func (s *PortForwardSession) SendClose(connID uint64, errStr string) error
- func (s *PortForwardSession) SendData(connID uint64, payload []byte) error
- func (s *PortForwardSession) SendOpen(connID uint64, remotePort uint32) error
- type PortForwardTarget
- type SecretClient
- func (s *SecretClient) CreateSecret(secret *types.Secret, ensureNamespace bool) error
- func (s *SecretClient) DeleteSecret(namespace, name string) error
- func (s *SecretClient) GetLogger() log.Logger
- func (s *SecretClient) GetSecret(namespace, name string) (*types.Secret, error)
- func (s *SecretClient) ListSecretVersions(namespace, name string) ([]*types.Secret, error)
- func (s *SecretClient) ListSecrets(namespace string, labelSelector string, fieldSelector string) ([]*types.Secret, error)
- func (s *SecretClient) PatchSecret(namespace, name string, set map[string]string, unset []string) (*types.Secret, error)
- func (s *SecretClient) RevealSecret(namespace, name string) (*types.Secret, error)
- func (s *SecretClient) RevealSecretVersion(namespace, name string, version int) (*types.Secret, error)
- func (s *SecretClient) RollbackSecret(namespace, name string, toVersion int) (*types.Secret, error)
- func (s *SecretClient) UpdateSecret(secret *types.Secret, force bool) error
- type ServiceClient
- func (s *ServiceClient) CreateService(service *types.Service, ensureNamespace bool) error
- func (s *ServiceClient) DeleteService(namespace, name string) error
- func (s *ServiceClient) DeleteServiceWithRequest(req *generated.DeleteServiceRequest) (*generated.DeleteServiceResponse, error)
- func (s *ServiceClient) GetDeletionStatus(namespace, name string) (*generated.GetDeletionStatusResponse, error)
- func (s *ServiceClient) GetLogger() log.Logger
- func (s *ServiceClient) GetService(namespace, name string) (*types.Service, error)
- func (s *ServiceClient) ListDeletionOperations(namespace, status string) (*generated.ListDeletionOperationsResponse, error)
- func (s *ServiceClient) ListInstances(req *generated.ListInstancesRequest) (*generated.ListInstancesResponse, error)
- func (s *ServiceClient) ListServices(namespace string, labelSelector string, fieldSelector string) ([]*types.Service, error)
- func (s *ServiceClient) ScaleService(namespace, name string, scale int) error
- func (s *ServiceClient) ScaleServiceWithRequest(req *generated.ScaleServiceRequest) (*generated.ServiceResponse, error)
- func (s *ServiceClient) UpdateService(service *types.Service, force bool) error
- func (s *ServiceClient) WatchScaling(namespace, name string, targetScale int) (<-chan *generated.ScalingStatusResponse, context.CancelFunc, error)
- func (s *ServiceClient) WatchServices(namespace string, labelSelector string, fieldSelector string) (<-chan WatchEvent, context.CancelFunc, error)
- type SnapshotClient
- func (c *SnapshotClient) CreateSnapshot(s *types.Snapshot, ensureNamespace bool) (*types.Snapshot, error)
- func (c *SnapshotClient) DeleteSnapshot(namespace, name string) error
- func (c *SnapshotClient) GetLogger() log.Logger
- func (c *SnapshotClient) GetSnapshot(namespace, name string) (*types.Snapshot, error)
- func (c *SnapshotClient) ListSnapshots(namespace string, labelSelector map[string]string) ([]*types.Snapshot, error)
- func (c *SnapshotClient) RestoreVolume(snapshotNamespace, snapshotName, targetVolumeName, targetNamespace, ... string, ...) (*types.Volume, error)
- type StorageClassClient
- func (c *StorageClassClient) CreateStorageClass(sc *types.StorageClass) error
- func (c *StorageClassClient) DeleteStorageClass(name string, cascade bool) error
- func (c *StorageClassClient) GetLogger() log.Logger
- func (c *StorageClassClient) GetStorageClass(name string) (*types.StorageClass, error)
- func (c *StorageClassClient) ListStorageClasses(labelSelector map[string]string) ([]*types.StorageClass, error)
- func (c *StorageClassClient) UpdateStorageClass(sc *types.StorageClass) error
- type VolumeClient
- func (c *VolumeClient) CreateVolume(v *types.Volume, ensureNamespace bool) error
- func (c *VolumeClient) DeleteVolume(namespace, name string) error
- func (c *VolumeClient) DetachVolume(namespace, name string, force bool) (*types.Volume, error)
- func (c *VolumeClient) GetLogger() log.Logger
- func (c *VolumeClient) GetVolume(namespace, name string) (*types.Volume, error)
- func (c *VolumeClient) ListVolumes(namespace string, labelSelector, fieldSelector map[string]string) ([]*types.Volume, error)
- func (c *VolumeClient) RetryProvisionVolume(namespace, name string) (*types.Volume, error)
- func (c *VolumeClient) UpdateVolume(v *types.Volume) error
- type WatchEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceToProto ¶
NamespaceToProto converts a domain namespace to a protobuf message.
func ProtoToNamespace ¶
ProtoToNamespace converts a protobuf message to a domain namespace.
func ProtoToSnapshot ¶
ProtoToSnapshot converts the proto wire form back into a types.Snapshot. Best-effort timestamp parsing — falls back to zero values if the proto strings aren't RFC3339.
func ProtoToStorageClass ¶
func ProtoToStorageClass(p *generated.StorageClass) *types.StorageClass
ProtoToStorageClass converts a wire StorageClass to its domain form. CreatedAt / UpdatedAt are parsed when present, ignoring parse errors.
func ProtoToVolume ¶
ProtoToVolume converts a wire Volume back to its domain form.
func ServiceToProto ¶
Helper functions for converting between types.Service and generated.Service serviceToProto converts a types.Service to a generated.Service proto message.
func SnapshotToProto ¶
SnapshotToProto converts a types.Snapshot to its proto wire form.
func StorageClassToProto ¶
func StorageClassToProto(sc *types.StorageClass) *generated.StorageClass
StorageClassToProto converts a domain StorageClass to its wire form.
Types ¶
type AuditClient ¶
type AuditClient struct {
// contains filtered or unexported fields
}
AuditClient provides access to the server-side audit log.
func NewAuditClient ¶
func NewAuditClient(client *Client) *AuditClient
NewAuditClient creates a new audit client.
func (*AuditClient) ListAuditEvents ¶
func (a *AuditClient) ListAuditEvents(opts AuditListOptions) ([]*types.AuditEvent, error)
ListAuditEvents returns audit events matching the filter, newest first.
type AuditListOptions ¶
type AuditListOptions struct {
Resource string
ResourceRef string
Namespace string
Actor string
Action string
Since time.Time
Until time.Time
Limit int
}
AuditListOptions narrows a ListAuditEvents call. Zero-value fields are ignored. Limit of 0 lets the server apply its default cap.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a client for interacting with the Rune API server.
func NewClient ¶
func NewClient(options *ClientOptions) (*Client, error)
NewClient creates a new API client with the given options.
func (*Client) Conn ¶
func (c *Client) Conn() *grpc.ClientConn
Conn exposes the underlying gRPC connection for generated clients
type ClientOptions ¶
type ClientOptions struct {
// Address of the API server
Address string
// TLS configuration
UseTLS bool
TLSCertFile string
// Authentication (token-only)
Token string
// Timeouts
DialTimeout time.Duration
CallTimeout time.Duration
// Logger
Logger log.Logger
}
ClientOptions holds configuration options for the API client.
func DefaultClientOptions ¶
func DefaultClientOptions() *ClientOptions
DefaultClientOptions returns the default client options.
type ConfigmapClient ¶
type ConfigmapClient struct {
// contains filtered or unexported fields
}
ConfigmapClient provides methods for interacting with configs on the Rune API server.
func NewConfigmapClient ¶
func NewConfigmapClient(client *Client) *ConfigmapClient
NewConfigmapClient creates a new configmap client.
func (*ConfigmapClient) CreateConfigmap ¶
func (c *ConfigmapClient) CreateConfigmap(configmap *types.Configmap, ensureNamespace bool) error
CreateConfig creates a new configmap on the API server.
func (*ConfigmapClient) DeleteConfigmap ¶
func (c *ConfigmapClient) DeleteConfigmap(namespace, name string) error
DeleteConfigmap deletes a configmap.
func (*ConfigmapClient) GetConfigmap ¶
func (c *ConfigmapClient) GetConfigmap(namespace, name string) (*types.Configmap, error)
GetConfigmap retrieves a configmap by name.
func (*ConfigmapClient) GetLogger ¶
func (c *ConfigmapClient) GetLogger() log.Logger
GetLogger returns the logger for this client
func (*ConfigmapClient) ListConfigmaps ¶
func (c *ConfigmapClient) ListConfigmaps(namespace string, labelSelector string, fieldSelector string) ([]*types.Configmap, error)
ListConfigmaps lists configmaps in a namespace.
func (*ConfigmapClient) UpdateConfigmap ¶
func (c *ConfigmapClient) UpdateConfigmap(configmap *types.Configmap) error
UpdateConfigmap updates an existing configmap.
type ExecClient ¶
type ExecClient struct {
// contains filtered or unexported fields
}
ExecClient provides methods for executing commands in instances.
func NewExecClient ¶
func NewExecClient(client *Client) *ExecClient
NewExecClient creates a new exec client.
func (*ExecClient) NewExecSession ¶
func (e *ExecClient) NewExecSession(ctx context.Context) (*ExecSession, error)
NewExecSession creates a new exec session.
type ExecOptions ¶
type ExecOptions struct {
Command []string // Command and arguments to execute
Env map[string]string // Environment variables to set
WorkingDir string // Working directory for the command
TTY bool // Whether to allocate a pseudo-TTY
TerminalWidth uint32 // Initial terminal width
TerminalHeight uint32 // Initial terminal height
Timeout time.Duration // Timeout for the exec session
// Debug requests a postmortem inspection session against a Failed
// instance. The server creates an ephemeral sidecar container with
// the failing instance's image/env/mounts and a sleep entrypoint, so
// the inner command runs against the same state without re-triggering
// the original crash. Only valid for instance-ID targets.
Debug bool
}
ExecOptions defines the configuration for command execution.
type ExecSession ¶
type ExecSession struct {
// contains filtered or unexported fields
}
ExecSession represents an active exec session.
func (*ExecSession) InitializeInstanceTarget ¶
func (s *ExecSession) InitializeInstanceTarget(target string, namespace string, options *ExecOptions) error
InitializeInstanceTarget initializes the exec session with the given options.
func (*ExecSession) InitializeServiceTarget ¶
func (s *ExecSession) InitializeServiceTarget(target string, namespace string, options *ExecOptions) error
InitializeServiceTarget initializes the exec session with the given options.
func (*ExecSession) RunInteractive ¶
func (s *ExecSession) RunInteractive() error
RunInteractive runs an interactive exec session.
func (*ExecSession) RunNonInteractive ¶
func (s *ExecSession) RunNonInteractive() error
RunNonInteractive runs a non-interactive exec session.
type HealthClient ¶
type HealthClient struct {
// contains filtered or unexported fields
}
HealthClient provides methods to query health info from the API server.
func NewHealthClient ¶
func NewHealthClient(client *Client) *HealthClient
NewHealthClient creates a new health client.
func (*HealthClient) GetAPIServerCapacity ¶
func (h *HealthClient) GetAPIServerCapacity() (float64, int64, error)
GetAPIServerCapacity returns server-cached single-node capacity (CPU cores, memory bytes). It queries the API server health with IncludeChecks and parses the capacity check.
func (*HealthClient) GetHealth ¶
func (h *HealthClient) GetHealth(componentType, name, namespace string, includeChecks bool) (*generated.GetHealthResponse, error)
GetHealth queries health for a component type
type InstanceClient ¶
type InstanceClient struct {
// contains filtered or unexported fields
}
InstanceClient provides methods for interacting with instances on the Rune API server.
func NewInstanceClient ¶
func NewInstanceClient(client *Client) *InstanceClient
NewInstanceClient creates a new instance client.
func (*InstanceClient) GetInstance ¶
func (i *InstanceClient) GetInstance(namespace, id string) (*types.Instance, error)
GetInstance retrieves an instance by ID.
func (*InstanceClient) ListInstances ¶
func (i *InstanceClient) ListInstances(namespace, serviceID, labelSelector, fieldSelector string) ([]*types.Instance, error)
ListInstances lists instances in a namespace with optional filtering.
func (*InstanceClient) RestartInstance ¶
func (i *InstanceClient) RestartInstance(namespace, id string, timeout time.Duration) error
RestartInstance restarts an instance.
func (*InstanceClient) StartInstance ¶
func (i *InstanceClient) StartInstance(namespace, id string) error
StartInstance starts an instance.
func (*InstanceClient) StopInstance ¶
func (i *InstanceClient) StopInstance(namespace, id string, timeout time.Duration) error
StopInstance stops an instance.
func (*InstanceClient) WatchInstances ¶
func (i *InstanceClient) WatchInstances(namespace, serviceID, labelSelector, fieldSelector string) (<-chan InstanceWatchEvent, error)
WatchInstances watches instances for changes and returns a channel of events. Note: This simulates watch by polling the list endpoint, since we need to regenerate the protobuf code to include the new WatchInstances API.
type InstanceWatchEvent ¶
type InstanceWatchEvent struct {
Instance *types.Instance
EventType string // "ADDED", "MODIFIED", "DELETED"
Error error
}
InstanceWatchEvent represents an instance change event
type LogClient ¶
type LogClient struct {
// contains filtered or unexported fields
}
LogClient provides methods for interacting with logs on the Rune API server.
func NewLogClient ¶
NewLogClient creates a new log client.
func (*LogClient) StreamLogs ¶
StreamLogs creates a bidirectional stream for log streaming. This is a convenience method that wraps the underlying gRPC StreamLogs call.
type NamespaceClient ¶
type NamespaceClient struct {
// contains filtered or unexported fields
}
NamespaceClient provides methods for interacting with namespaces on the Rune API server.
func NewNamespaceClient ¶
func NewNamespaceClient(client *Client) *NamespaceClient
NewNamespaceClient creates a new namespace client.
func (*NamespaceClient) CreateNamespace ¶
func (n *NamespaceClient) CreateNamespace(namespace *types.Namespace) error
CreateNamespace creates a new namespace on the API server.
func (*NamespaceClient) DeleteNamespace ¶
func (n *NamespaceClient) DeleteNamespace(name string, ignoreNotFound, force bool) error
DeleteNamespace deletes a namespace by name.
func (*NamespaceClient) GetLogger ¶
func (n *NamespaceClient) GetLogger() log.Logger
GetLogger returns the logger for this client
func (*NamespaceClient) GetNamespace ¶
func (n *NamespaceClient) GetNamespace(name string) (*types.Namespace, error)
GetNamespace retrieves a namespace by name.
func (*NamespaceClient) ListNamespaces ¶
func (n *NamespaceClient) ListNamespaces(labelSelector, fieldSelector map[string]string) ([]*types.Namespace, error)
ListNamespaces lists all namespaces with optional filtering.
func (*NamespaceClient) WatchNamespaces ¶
func (n *NamespaceClient) WatchNamespaces(labelSelector, fieldSelector map[string]string) (<-chan *types.Namespace, error)
WatchNamespaces watches for namespace changes.
type PortForwardClient ¶
type PortForwardClient struct {
// contains filtered or unexported fields
}
PortForwardClient provides access to the gRPC PortForwardService (RUNE-122). One PortForwardClient owns one streaming session; the CLI multiplexes any number of accepted local connections over it.
func NewPortForwardClient ¶
func NewPortForwardClient(client *Client) *PortForwardClient
NewPortForwardClient creates a new port-forward client.
func (*PortForwardClient) Open ¶
func (c *PortForwardClient) Open(ctx context.Context, target PortForwardTarget) (*PortForwardSession, *PortForwardReady, error)
Open opens a session and waits for the Ready frame.
type PortForwardReady ¶
PortForwardReady is returned by Ready() once the server has bound the stream to a concrete instance.
type PortForwardSession ¶
type PortForwardSession struct {
// contains filtered or unexported fields
}
PortForwardSession is a single open StreamPortForward call.
The session holds the bidi gRPC stream and serialises Sends through an internal channel so callers can fan-out Open / Data frames from any goroutine. Recv is single-consumer: typically the CLI runs one receive loop that demultiplexes frames into per-conn_id channels.
func (*PortForwardSession) Close ¶
func (s *PortForwardSession) Close() error
Close half-closes the stream and waits for the send loop to drain. Safe to call from any goroutine; idempotent.
func (*PortForwardSession) Recv ¶
func (s *PortForwardSession) Recv() (*generated.PortForwardServerMessage, error)
Recv reads the next frame from the server. Returns io.EOF on clean stream end.
func (*PortForwardSession) SendClose ¶
func (s *PortForwardSession) SendClose(connID uint64, errStr string) error
SendClose terminates a single conn within the session.
type PortForwardTarget ¶
type PortForwardTarget struct {
Service string
InstanceID string
Namespace string
// Pin selects a specific instance when Service has scale>1.
Pin string
// Ports the client intends to forward (informational/audit).
Ports []uint32
}
PortForwardTarget identifies the instance to bind a forward to. Exactly one of Service or InstanceID must be non-empty.
type SecretClient ¶
type SecretClient struct {
// contains filtered or unexported fields
}
SecretClient provides methods for interacting with secrets on the Rune API server.
func NewSecretClient ¶
func NewSecretClient(client *Client) *SecretClient
NewSecretClient creates a new secret client.
func (*SecretClient) CreateSecret ¶
func (s *SecretClient) CreateSecret(secret *types.Secret, ensureNamespace bool) error
CreateSecret creates a new secret on the API server.
func (*SecretClient) DeleteSecret ¶
func (s *SecretClient) DeleteSecret(namespace, name string) error
DeleteSecret deletes a secret.
func (*SecretClient) GetLogger ¶
func (s *SecretClient) GetLogger() log.Logger
GetLogger returns the logger for this client
func (*SecretClient) GetSecret ¶
func (s *SecretClient) GetSecret(namespace, name string) (*types.Secret, error)
GetSecret retrieves a secret by name.
As of dev.33, GetSecret returns metadata only — the returned Secret has an empty Data map and a populated DataKeys list. Use RevealSecret to obtain the plaintext payload (requires the secrets:reveal RBAC verb).
func (*SecretClient) ListSecretVersions ¶
func (s *SecretClient) ListSecretVersions(namespace, name string) ([]*types.Secret, error)
ListSecretVersions returns metadata for every historical version of a secret, newest first. Plaintext data is omitted; DataKeys is populated per version. Use RevealSecretVersion to obtain a specific version's plaintext payload (requires the secrets:reveal verb).
func (*SecretClient) ListSecrets ¶
func (s *SecretClient) ListSecrets(namespace string, labelSelector string, fieldSelector string) ([]*types.Secret, error)
ListSecrets lists secrets in a namespace.
func (*SecretClient) PatchSecret ¶
func (s *SecretClient) PatchSecret(namespace, name string, set map[string]string, unset []string) (*types.Secret, error)
PatchSecret performs a server-side merge update of a secret's data map. set entries upsert; unset keys are removed. The server returns metadata only (no plaintext) so this only requires the secrets:update RBAC verb. Returns the updated metadata Secret (data map empty, DataKeys populated).
func (*SecretClient) RevealSecret ¶
func (s *SecretClient) RevealSecret(namespace, name string) (*types.Secret, error)
RevealSecret retrieves the plaintext data payload of a secret.
Requires the secrets:reveal RBAC verb. Each successful call emits a `reveal` audit event server-side; failures are also recorded with outcome=error.
func (*SecretClient) RevealSecretVersion ¶
func (s *SecretClient) RevealSecretVersion(namespace, name string, version int) (*types.Secret, error)
RevealSecretVersion returns the plaintext payload of a specific historical version of a secret. Requires the secrets:reveal RBAC verb.
func (*SecretClient) RollbackSecret ¶
RollbackSecret rewrites the secret's HEAD to the contents of a prior version, producing a new HEAD version (head+1). Requires the secrets:update RBAC verb. Emits a `rollback` audit event server-side recording fromVersion (previous head), toVersion (target), and newVersion (the new head).
func (*SecretClient) UpdateSecret ¶
func (s *SecretClient) UpdateSecret(secret *types.Secret, force bool) error
UpdateSecret updates an existing secret.
type ServiceClient ¶
type ServiceClient struct {
// contains filtered or unexported fields
}
ServiceClient provides methods for interacting with services on the Rune API server.
func NewServiceClient ¶
func NewServiceClient(client *Client) *ServiceClient
NewServiceClient creates a new service client.
func (*ServiceClient) CreateService ¶
func (s *ServiceClient) CreateService(service *types.Service, ensureNamespace bool) error
CreateService creates a new service on the API server.
func (*ServiceClient) DeleteService ¶
func (s *ServiceClient) DeleteService(namespace, name string) error
DeleteService deletes a service by name.
func (*ServiceClient) DeleteServiceWithRequest ¶
func (s *ServiceClient) DeleteServiceWithRequest(req *generated.DeleteServiceRequest) (*generated.DeleteServiceResponse, error)
DeleteServiceWithRequest deletes a service with the full request object.
func (*ServiceClient) GetDeletionStatus ¶
func (s *ServiceClient) GetDeletionStatus(namespace, name string) (*generated.GetDeletionStatusResponse, error)
GetDeletionStatus gets the status of a deletion operation.
func (*ServiceClient) GetLogger ¶
func (s *ServiceClient) GetLogger() log.Logger
GetLogger returns the logger for this client
func (*ServiceClient) GetService ¶
func (s *ServiceClient) GetService(namespace, name string) (*types.Service, error)
GetService retrieves a service by name.
func (*ServiceClient) ListDeletionOperations ¶
func (s *ServiceClient) ListDeletionOperations(namespace, status string) (*generated.ListDeletionOperationsResponse, error)
ListDeletionOperations lists all deletion operations.
func (*ServiceClient) ListInstances ¶
func (s *ServiceClient) ListInstances(req *generated.ListInstancesRequest) (*generated.ListInstancesResponse, error)
ListInstances lists instances for a service.
func (*ServiceClient) ListServices ¶
func (s *ServiceClient) ListServices(namespace string, labelSelector string, fieldSelector string) ([]*types.Service, error)
ListServices lists services in a namespace with optional filtering.
func (*ServiceClient) ScaleService ¶
func (s *ServiceClient) ScaleService(namespace, name string, scale int) error
ScaleService changes the scale of a service.
func (*ServiceClient) ScaleServiceWithRequest ¶
func (s *ServiceClient) ScaleServiceWithRequest(req *generated.ScaleServiceRequest) (*generated.ServiceResponse, error)
ScaleServiceWithRequest changes the scale of a service with the full request object.
func (*ServiceClient) UpdateService ¶
func (s *ServiceClient) UpdateService(service *types.Service, force bool) error
UpdateService updates an existing service.
func (*ServiceClient) WatchScaling ¶
func (s *ServiceClient) WatchScaling(namespace, name string, targetScale int) (<-chan *generated.ScalingStatusResponse, context.CancelFunc, error)
WatchScaling observes the scaling progress of a service and returns a channel of status updates. The caller should close the cancel function when done watching to prevent resource leaks.
func (*ServiceClient) WatchServices ¶
func (s *ServiceClient) WatchServices(namespace string, labelSelector string, fieldSelector string) (<-chan WatchEvent, context.CancelFunc, error)
WatchServices watches services for changes and returns a channel of events. The caller should call the cancel function when done watching to prevent resource leaks.
type SnapshotClient ¶
type SnapshotClient struct {
// contains filtered or unexported fields
}
SnapshotClient is the typed wrapper around generated.SnapshotServiceClient.
func NewSnapshotClient ¶
func NewSnapshotClient(c *Client) *SnapshotClient
NewSnapshotClient constructs a SnapshotClient.
func (*SnapshotClient) CreateSnapshot ¶
func (*SnapshotClient) DeleteSnapshot ¶
func (c *SnapshotClient) DeleteSnapshot(namespace, name string) error
func (*SnapshotClient) GetLogger ¶
func (c *SnapshotClient) GetLogger() log.Logger
GetLogger returns the client's logger.
func (*SnapshotClient) GetSnapshot ¶
func (c *SnapshotClient) GetSnapshot(namespace, name string) (*types.Snapshot, error)
func (*SnapshotClient) ListSnapshots ¶
func (*SnapshotClient) RestoreVolume ¶
func (c *SnapshotClient) RestoreVolume(snapshotNamespace, snapshotName, targetVolumeName, targetNamespace, storageClassName string, labels map[string]string) (*types.Volume, error)
RestoreVolume creates a new Volume from this Snapshot. Returns the new Volume row in Pending; the VolumeController drives it through driver.RestoreFromSnapshot to Available.
type StorageClassClient ¶
type StorageClassClient struct {
// contains filtered or unexported fields
}
StorageClassClient is the typed wrapper around generated.StorageClassServiceClient.
func NewStorageClassClient ¶
func NewStorageClassClient(client *Client) *StorageClassClient
NewStorageClassClient constructs a StorageClassClient.
func (*StorageClassClient) CreateStorageClass ¶
func (c *StorageClassClient) CreateStorageClass(sc *types.StorageClass) error
func (*StorageClassClient) DeleteStorageClass ¶
func (c *StorageClassClient) DeleteStorageClass(name string, cascade bool) error
func (*StorageClassClient) GetLogger ¶
func (c *StorageClassClient) GetLogger() log.Logger
GetLogger returns the client's logger.
func (*StorageClassClient) GetStorageClass ¶
func (c *StorageClassClient) GetStorageClass(name string) (*types.StorageClass, error)
func (*StorageClassClient) ListStorageClasses ¶
func (c *StorageClassClient) ListStorageClasses(labelSelector map[string]string) ([]*types.StorageClass, error)
func (*StorageClassClient) UpdateStorageClass ¶
func (c *StorageClassClient) UpdateStorageClass(sc *types.StorageClass) error
type VolumeClient ¶
type VolumeClient struct {
// contains filtered or unexported fields
}
VolumeClient is the typed wrapper around generated.VolumeServiceClient.
func NewVolumeClient ¶
func NewVolumeClient(c *Client) *VolumeClient
NewVolumeClient constructs a VolumeClient.
func (*VolumeClient) CreateVolume ¶
func (c *VolumeClient) CreateVolume(v *types.Volume, ensureNamespace bool) error
func (*VolumeClient) DeleteVolume ¶
func (c *VolumeClient) DeleteVolume(namespace, name string) error
func (*VolumeClient) DetachVolume ¶
DetachVolume clears bind state on a volume so a replacement instance can attach it. With force=true the call is allowed regardless of current status.
func (*VolumeClient) GetLogger ¶
func (c *VolumeClient) GetLogger() log.Logger
GetLogger returns the client's logger.
func (*VolumeClient) GetVolume ¶
func (c *VolumeClient) GetVolume(namespace, name string) (*types.Volume, error)
func (*VolumeClient) ListVolumes ¶
func (*VolumeClient) RetryProvisionVolume ¶
func (c *VolumeClient) RetryProvisionVolume(namespace, name string) (*types.Volume, error)
RetryProvisionVolume re-arms a Failed/Stalled volume by transitioning it back to Pending. Returns the updated Volume.
func (*VolumeClient) UpdateVolume ¶
func (c *VolumeClient) UpdateVolume(v *types.Volume) error