Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Preparer ¶
Preparer to prepare GPU data to specific structure for writing to Goat server.
func CreatePreparer ¶
func CreatePreparer(ir *reader.Reader, cr *reader.Reader, limiter *rate.Limiter, conn *grpc.ClientConn) *Preparer
CreatePreparer creates Preparer for virtual machine records.
func (*Preparer) Finish ¶
func (p *Preparer) Finish()
Finish gets to know to the Goat server that a writing is finished and a response is expected. Then, it closes the gRPC connection.
func (*Preparer) InitializeMaps ¶
InitializeMaps reads additional data for virtual machine record.
func (*Preparer) Preparation ¶
Preparation prepares GPU data for writing and call method to write.
func (*Preparer) SendIdentifier ¶
SendIdentifier sends identifier to Goat server.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor to process GPU's data.
func CreateProcessor ¶
CreateProcessor creates processor with reader.
func (*Processor) Process ¶
func (p *Processor) Process(project projects.Project, osClient *gophercloud.ProviderClient, read chan resource.Resource, wg *sync.WaitGroup)
Process provides listing of the flavors, filtering flavors without `nvidia` in the name, listing of servers without pagination (all pages extracted in one step), listing of the extra specs for servers with flavor ID null or flavor name contained `nvidia`.
type Resource ¶
type Resource struct { Project *projects.Project Server *servers.Server ExtraSpecs map[string]string }
Resource represents "GPU Resource" with information about project, server and his extra specs.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON function to implement Resource interface.
type Writer ¶
type Writer struct { Stream pb.AccountingService_ProcessGPUsClient // contains filtered or unexported fields }
Writer structure to write gpu data to Goat server.
func CreateWriter ¶
CreateWriter creates Writer for gpu data.
func (*Writer) Close ¶
Close gets to know to the goat server that a writing is finished and a response is expected.
func (*Writer) SendIdentifier ¶
SendIdentifier sends identifier to Goat server.
func (*Writer) SetUp ¶
func (w *Writer) SetUp(conn *grpc.ClientConn)
SetUp creates gRPC client and sets up Stream to process gpu data to Writer.