Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateIngress(req *proto.CreateIngressRequest) (*proto.Ingress, error)
- func (c *Client) CreateSecret(name string, data []byte) (*proto.Secret, error)
- func (c *Client) CreateService(name, image string, replicas int32, env map[string]string) (*proto.Service, error)
- func (c *Client) CreateServiceWithOptions(req *proto.CreateServiceRequest) (*proto.Service, error)
- func (c *Client) CreateTLSCertificate(req *proto.CreateTLSCertificateRequest) (*proto.TLSCertificate, error)
- func (c *Client) CreateVolume(name, driver string, options map[string]string) (*proto.Volume, error)
- func (c *Client) DeleteIngress(req *proto.DeleteIngressRequest) error
- func (c *Client) DeleteSecret(name string) error
- func (c *Client) DeleteService(id string) error
- func (c *Client) DeleteTLSCertificate(req *proto.DeleteTLSCertificateRequest) error
- func (c *Client) DeleteVolume(name string) error
- func (c *Client) GenerateJoinToken(role string) (string, error)
- func (c *Client) GetClusterInfo() (*proto.GetClusterInfoResponse, error)
- func (c *Client) GetIngress(req *proto.GetIngressRequest) (*proto.Ingress, error)
- func (c *Client) GetNode(id string) (*proto.Node, error)
- func (c *Client) GetSecretByName(name string) (*proto.Secret, error)
- func (c *Client) GetService(nameOrID string) (*proto.Service, error)
- func (c *Client) GetTLSCertificate(req *proto.GetTLSCertificateRequest) (*proto.TLSCertificate, error)
- func (c *Client) GetVolumeByName(name string) (*proto.Volume, error)
- func (c *Client) JoinCluster(nodeID, bindAddr, token string) error
- func (c *Client) ListIngresses() ([]*proto.Ingress, error)
- func (c *Client) ListNodes() ([]*proto.Node, error)
- func (c *Client) ListSecrets() ([]*proto.Secret, error)
- func (c *Client) ListServices() ([]*proto.Service, error)
- func (c *Client) ListTLSCertificates() ([]*proto.TLSCertificate, error)
- func (c *Client) ListTasks(serviceID, nodeID string) ([]*proto.Task, error)
- func (c *Client) ListVolumes() ([]*proto.Volume, error)
- func (c *Client) UpdateIngress(req *proto.UpdateIngressRequest) (*proto.Ingress, error)
- func (c *Client) UpdateService(id string, replicas int32) (*proto.Service, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Warren gRPC client for easy CLI usage
func NewClientWithToken ¶
NewClientWithToken creates a new Warren client and requests a certificate using a join token
func (*Client) CreateIngress ¶
CreateIngress creates a new ingress
func (*Client) CreateSecret ¶
CreateSecret creates a new secret
func (*Client) CreateService ¶
func (c *Client) CreateService(name, image string, replicas int32, env map[string]string) (*proto.Service, error)
CreateService creates a new service
func (*Client) CreateServiceWithOptions ¶
CreateServiceWithOptions creates a new service with full options including health checks
func (*Client) CreateTLSCertificate ¶
func (c *Client) CreateTLSCertificate(req *proto.CreateTLSCertificateRequest) (*proto.TLSCertificate, error)
CreateTLSCertificate creates a new TLS certificate
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(name, driver string, options map[string]string) (*proto.Volume, error)
CreateVolume creates a new volume
func (*Client) DeleteIngress ¶
func (c *Client) DeleteIngress(req *proto.DeleteIngressRequest) error
DeleteIngress deletes an ingress
func (*Client) DeleteSecret ¶
DeleteSecret deletes a secret
func (*Client) DeleteService ¶
DeleteService deletes a service
func (*Client) DeleteTLSCertificate ¶
func (c *Client) DeleteTLSCertificate(req *proto.DeleteTLSCertificateRequest) error
DeleteTLSCertificate deletes a TLS certificate
func (*Client) DeleteVolume ¶
DeleteVolume deletes a volume
func (*Client) GenerateJoinToken ¶
GenerateJoinToken generates a join token for a worker or manager
func (*Client) GetClusterInfo ¶
func (c *Client) GetClusterInfo() (*proto.GetClusterInfoResponse, error)
GetClusterInfo returns information about the cluster
func (*Client) GetIngress ¶
GetIngress retrieves an ingress by ID or name
func (*Client) GetSecretByName ¶
GetSecretByName retrieves a secret by name (returns metadata only, no data)
func (*Client) GetService ¶
GetService gets a service by name or ID
func (*Client) GetTLSCertificate ¶
func (c *Client) GetTLSCertificate(req *proto.GetTLSCertificateRequest) (*proto.TLSCertificate, error)
GetTLSCertificate retrieves a TLS certificate by ID or name
func (*Client) GetVolumeByName ¶
GetVolumeByName retrieves a volume by name
func (*Client) JoinCluster ¶
JoinCluster joins a node to the cluster
func (*Client) ListIngresses ¶
ListIngresses lists all ingresses
func (*Client) ListSecrets ¶
ListSecrets lists all secrets (returns metadata only, no data)
func (*Client) ListServices ¶
ListServices lists all services
func (*Client) ListTLSCertificates ¶
func (c *Client) ListTLSCertificates() ([]*proto.TLSCertificate, error)
ListTLSCertificates lists all TLS certificates
func (*Client) ListVolumes ¶
ListVolumes lists all volumes
func (*Client) UpdateIngress ¶
UpdateIngress updates an existing ingress