server

package
v0.0.0-...-371bc73 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

Filter contains times from/to filter records.

func CreateFilter

func CreateFilter() *Filter

CreateFilter creates Filter.

func (*Filter) Filtering

func (f *Filter) Filtering(res resource.Resource, filtered chan resource.Resource, wg *sync.WaitGroup)

Filtering provides filtering given resources according to configuration or command line flags and writing to filtered channel.

type Preparer

type Preparer struct {
	Writer writer.Writer
	// contains filtered or unexported fields
}

Preparer to prepare virtual machine 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

func (p *Preparer) InitializeMaps(wg *sync.WaitGroup)

InitializeMaps reads additional data for virtual machine record.

func (*Preparer) Preparation

func (p *Preparer) Preparation(acc resource.Resource, wg *sync.WaitGroup)

Preparation prepares virtual machine data for writing and call method to write.

func (*Preparer) SendIdentifier

func (p *Preparer) SendIdentifier() error

SendIdentifier sends identifier to Goat server.

type Processor

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

Processor to process server's data.

func CreateProcessor

func CreateProcessor(r *reader.Reader) *Processor

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 servers with pagination.

func (*Processor) Reader

func (p *Processor) Reader() *reader.Reader

Reader gets reader.

type SFStruct

type SFStruct struct {
	Server *servers.Server
	Flavor *flavors.Flavor
}

SFStruct represents "Resource" with information about server and his flavor.

func (*SFStruct) UnmarshalJSON

func (sf *SFStruct) UnmarshalJSON(b []byte) error

UnmarshalJSON function to implement Resource interface.

type Writer

type Writer struct {
	Stream pb.AccountingService_ProcessVmsClient
	// contains filtered or unexported fields
}

Writer structure to write virtual machine data to Goat server.

func CreateWriter

func CreateWriter(limiter *rate.Limiter) *Writer

CreateWriter creates Writer for virtual machine data.

func (*Writer) Close

func (w *Writer) Close() (*empty.Empty, error)

Close gets to know to the goat server that a writing is finished and a response is expected.

func (*Writer) SendIdentifier

func (w *Writer) SendIdentifier() error

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 virtual machines to Writer.

func (*Writer) Write

func (w *Writer) Write(record writer.Record) error

Write writes virtual machine record to Goat server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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