importer

package
v0.0.0-...-9a80f3b Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountingServiceImpl

type AccountingServiceImpl struct {
	goat_grpc.UnimplementedAccountingServiceServer // warning: struct of size 72 bytes could be of size 64 bytes
	// contains filtered or unexported fields
}

AccountingServiceImpl implements goat_grpc.AccountingService server

func NewAccountingServiceImpl

func NewAccountingServiceImpl(vmConsumer, ipConsumer, storageConsumer,
	gpuConsumer consumer.Interface) AccountingServiceImpl

NewAccountingServiceImpl creates a grpc server that sends received data to given channels and uses clientIdentifierValidator to validate client identifiers

func (AccountingServiceImpl) ProcessGPUs

ProcessGPUs is a GRPC call -- do not use

func (AccountingServiceImpl) ProcessIps

ProcessIps is a GRPC call -- do not use

func (AccountingServiceImpl) ProcessStorages

ProcessStorages is a GRPC call -- do not use

func (AccountingServiceImpl) ProcessVms

ProcessVms is a GRPC call -- do not use

type RecordStream

type RecordStream interface {
	// ReceiveIdentifier receives client identifier from given stream.
	// If the first message is not client identifier, errNonFirstClientIdentifier is returned
	ReceiveIdentifier() (string, error)

	// Receive receives the next record from the stream.
	// If there is no more records in the stream, io.EOF is returned.
	// If an identifier is received, errNonFirstClientIdentifier is returned.
	Receive() (wrapper.RecordWrapper, error)

	// Close closes the stream
	Close() error
}

RecordStream is a stream of records. ReceiveIdentifier must be called first, then Receive can be called

func WrapGPUs

WrapGPUs wraps gRPC stream of GPU records in a RecordStream

func WrapIps

WrapIps wraps gRPC stream of IPs in a RecordStream

func WrapStorages

WrapStorages wraps gRPC stream of Storage records in a RecordStream

func WrapVms

WrapVms wraps GRPC stream of VMs in a RecordStream

Jump to

Keyboard shortcuts

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