Documentation
¶
Index ¶
- type AccountingServiceImpl
- func (asi AccountingServiceImpl) ProcessGPUs(gpus goat_grpc.AccountingService_ProcessGPUsServer) error
- func (asi AccountingServiceImpl) ProcessIps(ips goat_grpc.AccountingService_ProcessIpsServer) error
- func (asi AccountingServiceImpl) ProcessStorages(storages goat_grpc.AccountingService_ProcessStoragesServer) error
- func (asi AccountingServiceImpl) ProcessVms(vms goat_grpc.AccountingService_ProcessVmsServer) error
- type RecordStream
- func WrapGPUs(gpus goat_grpc.AccountingService_ProcessGPUsServer) RecordStream
- func WrapIps(ips goat_grpc.AccountingService_ProcessIpsServer) RecordStream
- func WrapStorages(storages goat_grpc.AccountingService_ProcessStoragesServer) RecordStream
- func WrapVms(vms goat_grpc.AccountingService_ProcessVmsServer) RecordStream
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 ¶
func (asi AccountingServiceImpl) ProcessGPUs(gpus goat_grpc.AccountingService_ProcessGPUsServer) error
ProcessGPUs is a GRPC call -- do not use
func (AccountingServiceImpl) ProcessIps ¶
func (asi AccountingServiceImpl) ProcessIps(ips goat_grpc.AccountingService_ProcessIpsServer) error
ProcessIps is a GRPC call -- do not use
func (AccountingServiceImpl) ProcessStorages ¶
func (asi AccountingServiceImpl) ProcessStorages(storages goat_grpc.AccountingService_ProcessStoragesServer) error
ProcessStorages is a GRPC call -- do not use
func (AccountingServiceImpl) ProcessVms ¶
func (asi AccountingServiceImpl) ProcessVms(vms goat_grpc.AccountingService_ProcessVmsServer) error
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 ¶
func WrapGPUs(gpus goat_grpc.AccountingService_ProcessGPUsServer) RecordStream
WrapGPUs wraps gRPC stream of GPU records in a RecordStream
func WrapIps ¶
func WrapIps(ips goat_grpc.AccountingService_ProcessIpsServer) RecordStream
WrapIps wraps gRPC stream of IPs in a RecordStream
func WrapStorages ¶
func WrapStorages(storages goat_grpc.AccountingService_ProcessStoragesServer) RecordStream
WrapStorages wraps gRPC stream of Storage records in a RecordStream
func WrapVms ¶
func WrapVms(vms goat_grpc.AccountingService_ProcessVmsServer) RecordStream
WrapVms wraps GRPC stream of VMs in a RecordStream