Documentation ¶
Index ¶
- type Config
- type Service
- func (t *Service) Apply(cfg interface{}) error
- func (t *Service) Create(ctx context.Context) error
- func (t *Service) Exec(ctx context.Context, name string, args ...string) (string, error)
- func (t *Service) FollowLogs(ctx context.Context, since string, tail string) (<-chan string, func(), error)
- func (t *Service) GetBranchImage(name string) string
- func (t *Service) GetCommand() []string
- func (t *Service) GetContainerName(ctx context.Context) string
- func (t *Service) GetDataDir() string
- func (t *Service) GetDefaultConfig() interface{}
- func (t *Service) GetEnvironment() map[string]string
- func (t *Service) GetHostname() string
- func (t *Service) GetImage() string
- func (t *Service) GetLogs(ctx context.Context, since string, tail string) ([]string, error)
- func (t *Service) GetMode() string
- func (t *Service) GetName() string
- func (t *Service) GetPorts() []string
- func (t *Service) GetRpcParams() (interface{}, error)
- func (t *Service) GetStartedAt(ctx context.Context) (string, error)
- func (t *Service) GetStatus(ctx context.Context) (string, error)
- func (t *Service) GetVolumes() []string
- func (t *Service) IsDisabled() bool
- func (t *Service) IsRunning() bool
- func (t *Service) Remove(ctx context.Context) error
- func (t *Service) RemoveData(ctx context.Context) error
- func (t *Service) Rescue(ctx context.Context) bool
- func (t *Service) Restart(ctx context.Context) error
- func (t *Service) Start(ctx context.Context) error
- func (t *Service) Stop(ctx context.Context) error
- func (t *Service) Up(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Name string Context types.Context Hostname string Image string Command []string Environment map[string]string Ports []string Volumes []string Disabled bool DataDir string Logger *logrus.Entry // contains filtered or unexported fields }
func (*Service) FollowLogs ¶
func (*Service) GetBranchImage ¶
func (*Service) GetCommand ¶
func (*Service) GetContainerName ¶
GetContainerName parses the container name from "docker-compose ps" command
Example 1. docker-compose ps opendexd
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------- 5efa0e55c882_testnet_opendexd_1 /entrypoint.sh Exit 255 0.0.0.0:55002->18885/tcp, 18887/tcp, 28887/tcp, 8887/tcp
Example 2. docker-compose ps opendexd1 ERROR: No such service: opendexd1
Example 3. docker-compose ps boltz Name Command State Ports ------------------------------
func (*Service) GetDataDir ¶
func (*Service) GetDefaultConfig ¶
func (t *Service) GetDefaultConfig() interface{}
func (*Service) GetEnvironment ¶
func (*Service) GetHostname ¶
func (*Service) GetRpcParams ¶
func (*Service) GetVolumes ¶
func (*Service) IsDisabled ¶
Click to show internal directories.
Click to hide internal directories.