server

package
v0.3.0-prep Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func New

func New(
	version string,
	instancer instance.Instancer,
	config instance.DB,
	messageBus platform.MessageBus,
	jobs jobs.JobStore,
	logger log.Logger,
) *Server

func (*Server) Automate

func (s *Server) Automate(instID flux.InstanceID, service flux.ServiceID) error

func (*Server) Deautomate

func (s *Server) Deautomate(instID flux.InstanceID, service flux.ServiceID) error

func (*Server) Export

func (s *Server) Export(inst flux.InstanceID) (res []byte, err error)

func (*Server) GenerateDeployKey

func (s *Server) GenerateDeployKey(instID flux.InstanceID) error

func (*Server) GetConfig

func (s *Server) GetConfig(instID flux.InstanceID, fingerprint string) (flux.InstanceConfig, error)

func (*Server) GetRelease

func (s *Server) GetRelease(inst flux.InstanceID, id jobs.JobID) (jobs.Job, error)

func (*Server) History

func (s *Server) History(inst flux.InstanceID, spec flux.ServiceSpec, before time.Time, limit int64) (res []flux.HistoryEntry, err error)

func (*Server) IsDaemonConnected

func (s *Server) IsDaemonConnected(instID flux.InstanceID) error

func (*Server) ListImages

func (s *Server) ListImages(inst flux.InstanceID, spec flux.ServiceSpec) (res []flux.ImageStatus, err error)

func (*Server) ListServices

func (s *Server) ListServices(inst flux.InstanceID, namespace string) (res []flux.ServiceStatus, err error)

func (*Server) Lock

func (s *Server) Lock(instID flux.InstanceID, service flux.ServiceID) error

func (*Server) PatchConfig

func (s *Server) PatchConfig(instID flux.InstanceID, patch flux.ConfigPatch) error

func (*Server) PostRelease

func (s *Server) PostRelease(inst flux.InstanceID, params jobs.ReleaseJobParams) (jobs.JobID, error)

func (*Server) RegisterDaemon

func (s *Server) RegisterDaemon(instID flux.InstanceID, platform platform.Platform) (err error)

RegisterDaemon handles a daemon connection. It blocks until the daemon is disconnected.

There are two conditions where we need to close and cleanup: either the server has initiated a close (due to another client showing up, say) or the client has disconnected.

If the server has initiated a close, we should close the other client's respective blocking goroutine.

If the client has disconnected, there is no way to detect this in go, aside from just trying to connection. Therefore, the server will get an error when we try to use the client. We rely on that to break us out of this method.

func (*Server) SetConfig

func (s *Server) SetConfig(instID flux.InstanceID, updates flux.UnsafeInstanceConfig) error

func (*Server) Status

func (s *Server) Status(inst flux.InstanceID) (res flux.Status, err error)

func (*Server) Unlock

func (s *Server) Unlock(instID flux.InstanceID, service flux.ServiceID) error

Jump to

Keyboard shortcuts

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