Version: v0.0.0-...-9e745d5 Latest Latest

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 4




This section is empty.


This section is empty.


This section is empty.


type Service

type Service struct {
	Mutex    *sync.Mutex        `json:",omitempty"`
	ID       int64              `json:"id,omitempty"`
	BinsID   int64              `json:"binid,omitempty"`
	Name     string             `json:"name"`
	Host     string             `json:"host,omitempty"`
	Status   string             `json:"status,omitempty"`
	Port     int                `json:"port,omitempty"`
	Type     string             `json:"type,omitempty"`
	Projects []string           `json:"projects,omitempty"`
	RunSTR   string             `json:"runstr,omitempty"`
	Owner    string             `json:"owner,omitempty"`
	DBClient *postgres.PGClient `json:",omitempty"`

Service - service structure, contains the service name, installation host, launch status, web address and mutex for blocking parallel changes in the launch status by different threads

func (*Service) Create

func (s *Service) Create(user string, owner string) (err error)

Create - install new service from remote host

func (*Service) CreateBin

func (s *Service) CreateBin(f io.Reader, own string) error

CreateBin - create bin from bins dir and insert data from tBins

func (*Service) Delete

func (s *Service) Delete(user string) (err error)

Delete - install new service from remote host

func (*Service) DeleteBin

func (s *Service) DeleteBin() error

DeleteBin - delete bins and data from tBins

func (*Service) Run

func (s *Service) Run(user string) error

Run - service run function. performs connection to the host via ssh.

func (*Service) Stop

func (s *Service) Stop(user string) error

Stop - service stop function. performs connection to the host via ssh. executes command pkill for service

func (*Service) Update

func (s *Service) Update() error

Update - update service info from database

func (*Service) UpdateBin

func (s *Service) UpdateBin() error

UpdateBin - update bins and data from tBins

Source Files

Jump to

Keyboard shortcuts

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