v2

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	PollTimeout xtime.Duration
	// contains filtered or unexported fields
}

Service service.

func New

func New(c *conf.Config) (s *Service)

New new a service.

func (*Service) AppService

func (s *Service) AppService(zone, env, token string) (service string, err error)

AppService ...

func (*Service) Builds

func (s *Service) Builds(c context.Context, svr string) (builds []string, err error)

Builds all builds

func (*Service) CheckLatest

func (s *Service) CheckLatest(c context.Context, rhost *model.Host, token string) (ver int64, err error)

CheckLatest ...

func (*Service) CheckVersion

func (s *Service) CheckVersion(c context.Context, rhost *model.Host, token string) (evt chan *model.Diff, err error)

CheckVersion check client version.

func (*Service) ClearHost

func (s *Service) ClearHost(c context.Context, svr string) (err error)

ClearHost clear service hosts.

func (*Service) Close

func (s *Service) Close()

Close close resources.

func (*Service) Config

func (s *Service) Config(c context.Context, svrName, token string, ver int64, ids []int64) (conf *model.Content, err error)

Config return config content.

func (*Service) ConfigCheck

func (s *Service) ConfigCheck(c context.Context, svrName, token string, ver int64, ids []int64) (conf *model.Content, err error)

ConfigCheck return config content.

func (*Service) File

func (s *Service) File(c context.Context, svr *model.Service) (val string, err error)

File get one file content.

func (*Service) Force

func (s *Service) Force(c context.Context, svr *model.Service, hostnames map[string]string, sType int8) (err error)

Force version to clients & generate config caches

func (*Service) Hosts

func (s *Service) Hosts(c context.Context, svr string) (hosts []*model.Host, err error)

Hosts return client hosts.

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping check is ok.

func (*Service) Push

func (s *Service) Push(c context.Context, svr *model.Service) (err error)

Push version to clients & generate config caches

func (*Service) SetToken

func (s *Service) SetToken(svr, token string) (err error)

SetToken set token.

func (*Service) TmpBuilds

func (s *Service) TmpBuilds(svr, env string) (builds []string, err error)

TmpBuilds get builds.

func (*Service) Unsub

func (s *Service) Unsub(svr, host string)

Unsub unsub a event.

func (*Service) VersionSuccess

func (s *Service) VersionSuccess(c context.Context, svr, bver string) (versions *model.Versions, err error)

VersionSuccess return client versions which configuration is complete

Jump to

Keyboard shortcuts

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