service

package
v0.0.0-...-84c4fc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Service Status
	Running = "Running"
	Stop    = "Stop"
	Unknown = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Desc

type Desc struct {
	Name   string
	Volume string
	Config string
}

func (*Desc) Equal

func (d *Desc) Equal(desc *Desc) bool

type Manager

type Manager struct {
	// contains filtered or unexported fields
}
var Mgr *Manager

func NewManager

func NewManager() *Manager

func (*Manager) AddService

func (m *Manager) AddService(name string, svc Service) error

func (*Manager) GetCurrentConfig

func (m *Manager) GetCurrentConfig(name string) (string, error)

func (*Manager) RestartService

func (m *Manager) RestartService(name string) error

func (*Manager) StartService

func (m *Manager) StartService(name string) error

func (*Manager) StopService

func (m *Manager) StopService(name string) error

func (*Manager) UpdateConfig

func (m *Manager) UpdateConfig(name string, data string) error

type Service

type Service interface {
	Stop() error
	Start() error
	Restart() error
	Describe() *Desc
}

type V2ray

type V2ray struct {
	// contains filtered or unexported fields
}

func NewV2ray

func NewV2ray(name string, docker *client.Client) *V2ray

func (*V2ray) Describe

func (v *V2ray) Describe() *Desc

func (*V2ray) Restart

func (v *V2ray) Restart() error

func (*V2ray) Start

func (v *V2ray) Start() error

func (*V2ray) Stop

func (v *V2ray) Stop() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL