usagev1connect

package
v0.0.0-...-94cd6a6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UsageServiceAddTrafficMonitorProcedure is the fully-qualified name of the UsageService's
	// AddTrafficMonitor RPC.
	UsageServiceAddTrafficMonitorProcedure = "/cloudstack.management.usage.v1.UsageService/AddTrafficMonitor"
	// UsageServiceAddTrafficTypeProcedure is the fully-qualified name of the UsageService's
	// AddTrafficType RPC.
	UsageServiceAddTrafficTypeProcedure = "/cloudstack.management.usage.v1.UsageService/AddTrafficType"
	// UsageServiceDeleteTrafficMonitorProcedure is the fully-qualified name of the UsageService's
	// DeleteTrafficMonitor RPC.
	UsageServiceDeleteTrafficMonitorProcedure = "/cloudstack.management.usage.v1.UsageService/DeleteTrafficMonitor"
	// UsageServiceDeleteTrafficTypeProcedure is the fully-qualified name of the UsageService's
	// DeleteTrafficType RPC.
	UsageServiceDeleteTrafficTypeProcedure = "/cloudstack.management.usage.v1.UsageService/DeleteTrafficType"
	// UsageServiceGenerateUsageRecordsProcedure is the fully-qualified name of the UsageService's
	// GenerateUsageRecords RPC.
	UsageServiceGenerateUsageRecordsProcedure = "/cloudstack.management.usage.v1.UsageService/GenerateUsageRecords"
	// UsageServiceListTrafficMonitorsProcedure is the fully-qualified name of the UsageService's
	// ListTrafficMonitors RPC.
	UsageServiceListTrafficMonitorsProcedure = "/cloudstack.management.usage.v1.UsageService/ListTrafficMonitors"
	// UsageServiceListTrafficTypeImplementorsProcedure is the fully-qualified name of the
	// UsageService's ListTrafficTypeImplementors RPC.
	UsageServiceListTrafficTypeImplementorsProcedure = "/cloudstack.management.usage.v1.UsageService/ListTrafficTypeImplementors"
	// UsageServiceListTrafficTypesProcedure is the fully-qualified name of the UsageService's
	// ListTrafficTypes RPC.
	UsageServiceListTrafficTypesProcedure = "/cloudstack.management.usage.v1.UsageService/ListTrafficTypes"
	// UsageServiceListUsageRecordsProcedure is the fully-qualified name of the UsageService's
	// ListUsageRecords RPC.
	UsageServiceListUsageRecordsProcedure = "/cloudstack.management.usage.v1.UsageService/ListUsageRecords"
	// UsageServiceListUsageTypesProcedure is the fully-qualified name of the UsageService's
	// ListUsageTypes RPC.
	UsageServiceListUsageTypesProcedure = "/cloudstack.management.usage.v1.UsageService/ListUsageTypes"
	// UsageServiceRemoveRawUsageRecordsProcedure is the fully-qualified name of the UsageService's
	// RemoveRawUsageRecords RPC.
	UsageServiceRemoveRawUsageRecordsProcedure = "/cloudstack.management.usage.v1.UsageService/RemoveRawUsageRecords"
	// UsageServiceUpdateTrafficTypeProcedure is the fully-qualified name of the UsageService's
	// UpdateTrafficType RPC.
	UsageServiceUpdateTrafficTypeProcedure = "/cloudstack.management.usage.v1.UsageService/UpdateTrafficType"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// UsageServiceName is the fully-qualified name of the UsageService service.
	UsageServiceName = "cloudstack.management.usage.v1.UsageService"
)

Variables

This section is empty.

Functions

func NewUsageServiceHandler

func NewUsageServiceHandler(svc UsageServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewUsageServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type UnimplementedUsageServiceHandler

type UnimplementedUsageServiceHandler struct{}

UnimplementedUsageServiceHandler returns CodeUnimplemented from all methods.

type UsageServiceClient

type UsageServiceClient interface {
	// AddTrafficMonitor Adds Traffic Monitor Host for Direct Network Usage
	AddTrafficMonitor(context.Context, *connect.Request[v1.AddTrafficMonitorRequest]) (*connect.Response[v1.AddTrafficMonitorResponse], error)
	// AddTrafficType Adds traffic type to a physical network
	AddTrafficType(context.Context, *connect.Request[v1.AddTrafficTypeRequest]) (*connect.Response[v1.AddTrafficTypeResponse], error)
	// DeleteTrafficMonitor Deletes an traffic monitor host.
	DeleteTrafficMonitor(context.Context, *connect.Request[v1.DeleteTrafficMonitorRequest]) (*connect.Response[v1.DeleteTrafficMonitorResponse], error)
	// DeleteTrafficType Deletes traffic type of a physical network
	DeleteTrafficType(context.Context, *connect.Request[v1.DeleteTrafficTypeRequest]) (*connect.Response[v1.DeleteTrafficTypeResponse], error)
	// GenerateUsageRecords Generates usage records. This will generate records only if there any records to be generated, i.e if the scheduled usage job was not run or failed
	GenerateUsageRecords(context.Context, *connect.Request[v1.GenerateUsageRecordsRequest]) (*connect.Response[v1.GenerateUsageRecordsResponse], error)
	// ListTrafficMonitors List traffic monitor Hosts.
	ListTrafficMonitors(context.Context, *connect.Request[v1.ListTrafficMonitorsRequest]) (*connect.Response[v1.ListTrafficMonitorsResponse], error)
	// ListTrafficTypeImplementors Lists implementors of implementor of a network traffic type or implementors of all network traffic types
	ListTrafficTypeImplementors(context.Context, *connect.Request[v1.ListTrafficTypeImplementorsRequest]) (*connect.Response[v1.ListTrafficTypeImplementorsResponse], error)
	// ListTrafficTypes Lists traffic types of a given physical network.
	ListTrafficTypes(context.Context, *connect.Request[v1.ListTrafficTypesRequest]) (*connect.Response[v1.ListTrafficTypesResponse], error)
	// ListUsageRecords Lists usage records for accounts
	ListUsageRecords(context.Context, *connect.Request[v1.ListUsageRecordsRequest]) (*connect.Response[v1.ListUsageRecordsResponse], error)
	// ListUsageTypes List Usage Types
	ListUsageTypes(context.Context, *connect.Request[v1.ListUsageTypesRequest]) (*connect.Response[v1.ListUsageTypesResponse], error)
	// RemoveRawUsageRecords Safely removes raw records from cloud_usage table
	RemoveRawUsageRecords(context.Context, *connect.Request[v1.RemoveRawUsageRecordsRequest]) (*connect.Response[v1.RemoveRawUsageRecordsResponse], error)
	// UpdateTrafficType Updates traffic type of a physical network
	UpdateTrafficType(context.Context, *connect.Request[v1.UpdateTrafficTypeRequest]) (*connect.Response[v1.UpdateTrafficTypeResponse], error)
}

UsageServiceClient is a client for the cloudstack.management.usage.v1.UsageService service.

func NewUsageServiceClient

func NewUsageServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UsageServiceClient

NewUsageServiceClient constructs a client for the cloudstack.management.usage.v1.UsageService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type UsageServiceHandler

type UsageServiceHandler interface {
	// AddTrafficMonitor Adds Traffic Monitor Host for Direct Network Usage
	AddTrafficMonitor(context.Context, *connect.Request[v1.AddTrafficMonitorRequest]) (*connect.Response[v1.AddTrafficMonitorResponse], error)
	// AddTrafficType Adds traffic type to a physical network
	AddTrafficType(context.Context, *connect.Request[v1.AddTrafficTypeRequest]) (*connect.Response[v1.AddTrafficTypeResponse], error)
	// DeleteTrafficMonitor Deletes an traffic monitor host.
	DeleteTrafficMonitor(context.Context, *connect.Request[v1.DeleteTrafficMonitorRequest]) (*connect.Response[v1.DeleteTrafficMonitorResponse], error)
	// DeleteTrafficType Deletes traffic type of a physical network
	DeleteTrafficType(context.Context, *connect.Request[v1.DeleteTrafficTypeRequest]) (*connect.Response[v1.DeleteTrafficTypeResponse], error)
	// GenerateUsageRecords Generates usage records. This will generate records only if there any records to be generated, i.e if the scheduled usage job was not run or failed
	GenerateUsageRecords(context.Context, *connect.Request[v1.GenerateUsageRecordsRequest]) (*connect.Response[v1.GenerateUsageRecordsResponse], error)
	// ListTrafficMonitors List traffic monitor Hosts.
	ListTrafficMonitors(context.Context, *connect.Request[v1.ListTrafficMonitorsRequest]) (*connect.Response[v1.ListTrafficMonitorsResponse], error)
	// ListTrafficTypeImplementors Lists implementors of implementor of a network traffic type or implementors of all network traffic types
	ListTrafficTypeImplementors(context.Context, *connect.Request[v1.ListTrafficTypeImplementorsRequest]) (*connect.Response[v1.ListTrafficTypeImplementorsResponse], error)
	// ListTrafficTypes Lists traffic types of a given physical network.
	ListTrafficTypes(context.Context, *connect.Request[v1.ListTrafficTypesRequest]) (*connect.Response[v1.ListTrafficTypesResponse], error)
	// ListUsageRecords Lists usage records for accounts
	ListUsageRecords(context.Context, *connect.Request[v1.ListUsageRecordsRequest]) (*connect.Response[v1.ListUsageRecordsResponse], error)
	// ListUsageTypes List Usage Types
	ListUsageTypes(context.Context, *connect.Request[v1.ListUsageTypesRequest]) (*connect.Response[v1.ListUsageTypesResponse], error)
	// RemoveRawUsageRecords Safely removes raw records from cloud_usage table
	RemoveRawUsageRecords(context.Context, *connect.Request[v1.RemoveRawUsageRecordsRequest]) (*connect.Response[v1.RemoveRawUsageRecordsResponse], error)
	// UpdateTrafficType Updates traffic type of a physical network
	UpdateTrafficType(context.Context, *connect.Request[v1.UpdateTrafficTypeRequest]) (*connect.Response[v1.UpdateTrafficTypeResponse], error)
}

UsageServiceHandler is an implementation of the cloudstack.management.usage.v1.UsageService service.

Jump to

Keyboard shortcuts

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