Documentation ¶
Index ¶
- type Service
- func (s *Service) GetDeploymentStatus(serviceName string, image string) (ServiceStatus, error)
- func (s *Service) GetService(filter filters.Args) (swarm.Service, error)
- func (s *Service) GetServiceStatus(serviceName string) (ServiceStatus, error)
- func (s *Service) GetTask(filter filters.Args) ([]swarm.Task, error)
- type ServiceStatus
- type Services
- type TaskStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
Service struct
func NewService ¶
NewService returns a new instance of the Service structure
func (*Service) GetDeploymentStatus ¶
func (s *Service) GetDeploymentStatus(serviceName string, image string) (ServiceStatus, error)
GetDeploymentStatus returns the information about a service and it verifies if the tasks are running or for some reason it failed
func (*Service) GetService ¶
GetService returns swarm.Service struct You will find the available filters on https://docs.docker.com/engine/api/v1.32/#operation/ServiceList
func (*Service) GetServiceStatus ¶
func (s *Service) GetServiceStatus(serviceName string) (ServiceStatus, error)
GetServiceStatus returns the information about a service and it verifies if the tasks are running or for some reason it failed
type ServiceStatus ¶
type ServiceStatus struct { ID string `json:",omitempty"` Name string Err string `json:",omitempty"` TaskStatus []TaskStatus `json:",omitempty"` Replicas *uint64 `json:",omitempty"` RunningReplicas int `json:",omitempty"` FailedReplicas int `json:",omitempty"` UpdateStatus *swarm.UpdateStatus `json:",omitempty"` }
ServiceStatus structure
type Services ¶
type Services interface { GetService(filter filters.Args) (swarm.Service, error) GetTask(filter filters.Args) ([]swarm.Task, error) GetDeploymentStatus(serviceName string, image string) (ServiceStatus, error) GetServiceStatus(serviceName string) (ServiceStatus, error) }
Services defines interfaces with the required methods
type TaskStatus ¶
type TaskStatus struct { TaskID string `json:",omitempty"` Timestamp time.Time `json:",omitempty"` DesiredState swarm.TaskState `json:",omitempty"` State swarm.TaskState `json:",omitempty"` Message string `json:",omitempty"` Err string `json:",omitempty"` Image string `json:",omitempty"` }
TaskStatus structure
Click to show internal directories.
Click to hide internal directories.