hosts

package
v0.0.0-...-d2b1cdf Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostInfoToHostModel

func HostInfoToHostModel(hostModels []*models_v0.Host) []*hostsvc.HostInfo

HostInfoToHostModel returns the array of models_v0.Host to hostsvc.HostInfo

Types

type Service

type Service interface {
	// GetHosts fetches a batch of hosts from the host manager matching filter.
	GetHosts(ctx context.Context, task *resmgr.Task, filter *hostsvc.HostFilter) (hosts []*models_v0.Host, err error)

	// ReserveHost Makes reservation for the host in hostmanager.
	ReserveHost(ctx context.Context, host []*models_v0.Host, task *resmgr.Task) (err error)

	// GetCompletedReservation gets the completed reservation
	// from host manager
	GetCompletedReservation(
		ctx context.Context) ([]*hostsvc.CompletedReservation, error)
}

Service will manage hosts used to get hosts and reserve hosts.

func NewService

NewService will create a new host service.

Jump to

Keyboard shortcuts

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