client

package
v0.0.0-...-d8f7d12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputedFile

type ComputedFile struct {
	Pathname string
	Source   string
}

type Machine

type Machine struct {
	Machine       mdb.Machine
	ComputedFiles []ComputedFile
}

type Manager

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

func New

func New(objSrv objectserver.ObjectServer, logger log.Logger) *Manager

New creates a new *Manager. Object data will be added to the object server objSrv. Only one Manager should be created per application. The logger will be used to log problems.

func (*Manager) Add

func (m *Manager) Add(machine Machine, size uint) <-chan []proto.FileInfo

Add will add a machine to the Manager. Re-adding a machine will result in a panic. The length of the returned channel buffer is determined by size. A channel is returned from which file information may be read. It is guaranteed that corresponding object data are in the object server before file information is available.

func (*Manager) Remove

func (m *Manager) Remove(hostname string)

Remove will remove a machine from the Manager. The corresponding file info channel will be closed.

func (*Manager) Update

func (m *Manager) Update(machine Machine)

Update will update the machine data for a machine, which may result in file info data being sent to the corresponding channel.

Jump to

Keyboard shortcuts

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