Documentation
¶
Index ¶
- Constants
- func NewUsageServiceHandler(svc UsageServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type UnimplementedUsageServiceHandler
- func (UnimplementedUsageServiceHandler) AddTrafficMonitor(context.Context, *connect.Request[v1.AddTrafficMonitorRequest]) (*connect.Response[v1.AddTrafficMonitorResponse], error)
- func (UnimplementedUsageServiceHandler) AddTrafficType(context.Context, *connect.Request[v1.AddTrafficTypeRequest]) (*connect.Response[v1.AddTrafficTypeResponse], error)
- func (UnimplementedUsageServiceHandler) DeleteTrafficMonitor(context.Context, *connect.Request[v1.DeleteTrafficMonitorRequest]) (*connect.Response[v1.DeleteTrafficMonitorResponse], error)
- func (UnimplementedUsageServiceHandler) DeleteTrafficType(context.Context, *connect.Request[v1.DeleteTrafficTypeRequest]) (*connect.Response[v1.DeleteTrafficTypeResponse], error)
- func (UnimplementedUsageServiceHandler) GenerateUsageRecords(context.Context, *connect.Request[v1.GenerateUsageRecordsRequest]) (*connect.Response[v1.GenerateUsageRecordsResponse], error)
- func (UnimplementedUsageServiceHandler) ListTrafficMonitors(context.Context, *connect.Request[v1.ListTrafficMonitorsRequest]) (*connect.Response[v1.ListTrafficMonitorsResponse], error)
- func (UnimplementedUsageServiceHandler) ListTrafficTypeImplementors(context.Context, *connect.Request[v1.ListTrafficTypeImplementorsRequest]) (*connect.Response[v1.ListTrafficTypeImplementorsResponse], error)
- func (UnimplementedUsageServiceHandler) ListTrafficTypes(context.Context, *connect.Request[v1.ListTrafficTypesRequest]) (*connect.Response[v1.ListTrafficTypesResponse], error)
- func (UnimplementedUsageServiceHandler) ListUsageRecords(context.Context, *connect.Request[v1.ListUsageRecordsRequest]) (*connect.Response[v1.ListUsageRecordsResponse], error)
- func (UnimplementedUsageServiceHandler) ListUsageTypes(context.Context, *connect.Request[v1.ListUsageTypesRequest]) (*connect.Response[v1.ListUsageTypesResponse], error)
- func (UnimplementedUsageServiceHandler) RemoveRawUsageRecords(context.Context, *connect.Request[v1.RemoveRawUsageRecordsRequest]) (*connect.Response[v1.RemoveRawUsageRecordsResponse], error)
- func (UnimplementedUsageServiceHandler) UpdateTrafficType(context.Context, *connect.Request[v1.UpdateTrafficTypeRequest]) (*connect.Response[v1.UpdateTrafficTypeResponse], error)
- type UsageServiceClient
- type UsageServiceHandler
Constants ¶
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.
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.
func (UnimplementedUsageServiceHandler) AddTrafficMonitor ¶
func (UnimplementedUsageServiceHandler) AddTrafficMonitor(context.Context, *connect.Request[v1.AddTrafficMonitorRequest]) (*connect.Response[v1.AddTrafficMonitorResponse], error)
func (UnimplementedUsageServiceHandler) AddTrafficType ¶
func (UnimplementedUsageServiceHandler) AddTrafficType(context.Context, *connect.Request[v1.AddTrafficTypeRequest]) (*connect.Response[v1.AddTrafficTypeResponse], error)
func (UnimplementedUsageServiceHandler) DeleteTrafficMonitor ¶
func (UnimplementedUsageServiceHandler) DeleteTrafficMonitor(context.Context, *connect.Request[v1.DeleteTrafficMonitorRequest]) (*connect.Response[v1.DeleteTrafficMonitorResponse], error)
func (UnimplementedUsageServiceHandler) DeleteTrafficType ¶
func (UnimplementedUsageServiceHandler) DeleteTrafficType(context.Context, *connect.Request[v1.DeleteTrafficTypeRequest]) (*connect.Response[v1.DeleteTrafficTypeResponse], error)
func (UnimplementedUsageServiceHandler) GenerateUsageRecords ¶
func (UnimplementedUsageServiceHandler) GenerateUsageRecords(context.Context, *connect.Request[v1.GenerateUsageRecordsRequest]) (*connect.Response[v1.GenerateUsageRecordsResponse], error)
func (UnimplementedUsageServiceHandler) ListTrafficMonitors ¶
func (UnimplementedUsageServiceHandler) ListTrafficMonitors(context.Context, *connect.Request[v1.ListTrafficMonitorsRequest]) (*connect.Response[v1.ListTrafficMonitorsResponse], error)
func (UnimplementedUsageServiceHandler) ListTrafficTypeImplementors ¶
func (UnimplementedUsageServiceHandler) ListTrafficTypeImplementors(context.Context, *connect.Request[v1.ListTrafficTypeImplementorsRequest]) (*connect.Response[v1.ListTrafficTypeImplementorsResponse], error)
func (UnimplementedUsageServiceHandler) ListTrafficTypes ¶
func (UnimplementedUsageServiceHandler) ListTrafficTypes(context.Context, *connect.Request[v1.ListTrafficTypesRequest]) (*connect.Response[v1.ListTrafficTypesResponse], error)
func (UnimplementedUsageServiceHandler) ListUsageRecords ¶
func (UnimplementedUsageServiceHandler) ListUsageRecords(context.Context, *connect.Request[v1.ListUsageRecordsRequest]) (*connect.Response[v1.ListUsageRecordsResponse], error)
func (UnimplementedUsageServiceHandler) ListUsageTypes ¶
func (UnimplementedUsageServiceHandler) ListUsageTypes(context.Context, *connect.Request[v1.ListUsageTypesRequest]) (*connect.Response[v1.ListUsageTypesResponse], error)
func (UnimplementedUsageServiceHandler) RemoveRawUsageRecords ¶
func (UnimplementedUsageServiceHandler) RemoveRawUsageRecords(context.Context, *connect.Request[v1.RemoveRawUsageRecordsRequest]) (*connect.Response[v1.RemoveRawUsageRecordsResponse], error)
func (UnimplementedUsageServiceHandler) UpdateTrafficType ¶
func (UnimplementedUsageServiceHandler) UpdateTrafficType(context.Context, *connect.Request[v1.UpdateTrafficTypeRequest]) (*connect.Response[v1.UpdateTrafficTypeResponse], error)
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.