v1

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIUsageService_GetAggregatedSummary_FullMethodName = "/llmariner.apiusage.server.v1.APIUsageService/GetAggregatedSummary"
)
View Source
const (
	CollectionInternalService_CreateUsage_FullMethodName = "/llmariner.apiusage.server.v1.CollectionInternalService/CreateUsage"
)

Variables

View Source
var APIUsageService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmariner.apiusage.server.v1.APIUsageService",
	HandlerType: (*APIUsageServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAggregatedSummary",
			Handler:    _APIUsageService_GetAggregatedSummary_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/usage_server.proto",
}

APIUsageService_ServiceDesc is the grpc.ServiceDesc for APIUsageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var CollectionInternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmariner.apiusage.server.v1.CollectionInternalService",
	HandlerType: (*CollectionInternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateUsage",
			Handler:    _CollectionInternalService_CreateUsage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/collector_server.proto",
}

CollectionInternalService_ServiceDesc is the grpc.ServiceDesc for CollectionInternalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_api_v1_collector_server_proto protoreflect.FileDescriptor
View Source
var File_api_v1_usage_server_proto protoreflect.FileDescriptor

Functions

func RegisterAPIUsageServiceServer added in v0.10.0

func RegisterAPIUsageServiceServer(s grpc.ServiceRegistrar, srv APIUsageServiceServer)

func RegisterCollectionInternalServiceServer

func RegisterCollectionInternalServiceServer(s grpc.ServiceRegistrar, srv CollectionInternalServiceServer)

Types

type APIUsageServiceClient added in v0.10.0

type APIUsageServiceClient interface {
	GetAggregatedSummary(ctx context.Context, in *GetAggregatedSummaryRequest, opts ...grpc.CallOption) (*AggregatedSummary, error)
}

APIUsageServiceClient is the client API for APIUsageService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAPIUsageServiceClient added in v0.10.0

func NewAPIUsageServiceClient(cc grpc.ClientConnInterface) APIUsageServiceClient

type APIUsageServiceServer added in v0.10.0

type APIUsageServiceServer interface {
	GetAggregatedSummary(context.Context, *GetAggregatedSummaryRequest) (*AggregatedSummary, error)
	// contains filtered or unexported methods
}

APIUsageServiceServer is the server API for APIUsageService service. All implementations must embed UnimplementedAPIUsageServiceServer for forward compatibility

type AggregatedSummary added in v0.10.0

type AggregatedSummary struct {
	Summary         *Summary   `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
	MethodSummaries []*Summary `protobuf:"bytes,2,rep,name=method_summaries,json=methodSummaries,proto3" json:"method_summaries,omitempty"`
	// contains filtered or unexported fields
}

func (*AggregatedSummary) Descriptor deprecated added in v0.10.0

func (*AggregatedSummary) Descriptor() ([]byte, []int)

Deprecated: Use AggregatedSummary.ProtoReflect.Descriptor instead.

func (*AggregatedSummary) GetMethodSummaries added in v0.10.0

func (x *AggregatedSummary) GetMethodSummaries() []*Summary

func (*AggregatedSummary) GetSummary added in v0.10.0

func (x *AggregatedSummary) GetSummary() *Summary

func (*AggregatedSummary) ProtoMessage added in v0.10.0

func (*AggregatedSummary) ProtoMessage()

func (*AggregatedSummary) ProtoReflect added in v0.10.0

func (x *AggregatedSummary) ProtoReflect() protoreflect.Message

func (*AggregatedSummary) Reset added in v0.10.0

func (x *AggregatedSummary) Reset()

func (*AggregatedSummary) String added in v0.10.0

func (x *AggregatedSummary) String() string

type CollectionInternalServiceClient

type CollectionInternalServiceClient interface {
	CreateUsage(ctx context.Context, in *CreateUsageRequest, opts ...grpc.CallOption) (*Usage, error)
}

CollectionInternalServiceClient is the client API for CollectionInternalService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CollectionInternalServiceServer

type CollectionInternalServiceServer interface {
	CreateUsage(context.Context, *CreateUsageRequest) (*Usage, error)
	// contains filtered or unexported methods
}

CollectionInternalServiceServer is the server API for CollectionInternalService service. All implementations must embed UnimplementedCollectionInternalServiceServer for forward compatibility

type CreateUsageRequest

type CreateUsageRequest struct {
	Records []*UsageRecord `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUsageRequest) Descriptor deprecated

func (*CreateUsageRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateUsageRequest.ProtoReflect.Descriptor instead.

func (*CreateUsageRequest) GetRecords

func (x *CreateUsageRequest) GetRecords() []*UsageRecord

func (*CreateUsageRequest) ProtoMessage

func (*CreateUsageRequest) ProtoMessage()

func (*CreateUsageRequest) ProtoReflect

func (x *CreateUsageRequest) ProtoReflect() protoreflect.Message

func (*CreateUsageRequest) Reset

func (x *CreateUsageRequest) Reset()

func (*CreateUsageRequest) String

func (x *CreateUsageRequest) String() string

type GetAggregatedSummaryRequest added in v0.10.0

type GetAggregatedSummaryRequest struct {
	TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// star_time is the UNIX timestamp for the summary start time (inclusive).
	// If start_time is not provided, the default is the 24 hours before end_time.
	StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// end_time is the UNIX timestamp for the summary end time (exclusive).
	// If end_time is not provided, the default is the current time.
	EndTime int64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAggregatedSummaryRequest) Descriptor deprecated added in v0.10.0

func (*GetAggregatedSummaryRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetAggregatedSummaryRequest.ProtoReflect.Descriptor instead.

func (*GetAggregatedSummaryRequest) GetEndTime added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetEndTime() int64

func (*GetAggregatedSummaryRequest) GetStartTime added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetStartTime() int64

func (*GetAggregatedSummaryRequest) GetTenantId added in v0.10.0

func (x *GetAggregatedSummaryRequest) GetTenantId() string

func (*GetAggregatedSummaryRequest) ProtoMessage added in v0.10.0

func (*GetAggregatedSummaryRequest) ProtoMessage()

func (*GetAggregatedSummaryRequest) ProtoReflect added in v0.10.0

func (*GetAggregatedSummaryRequest) Reset added in v0.10.0

func (x *GetAggregatedSummaryRequest) Reset()

func (*GetAggregatedSummaryRequest) String added in v0.10.0

func (x *GetAggregatedSummaryRequest) String() string

type Summary added in v0.10.0

type Summary struct {
	Method          string  `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	TotalRequests   int64   `protobuf:"varint,2,opt,name=total_requests,json=totalRequests,proto3" json:"total_requests,omitempty"`
	SuccessRequests int64   `protobuf:"varint,3,opt,name=success_requests,json=successRequests,proto3" json:"success_requests,omitempty"`
	FailureRequests int64   `protobuf:"varint,4,opt,name=failure_requests,json=failureRequests,proto3" json:"failure_requests,omitempty"`
	AverageLatency  float64 `protobuf:"fixed64,5,opt,name=average_latency,json=averageLatency,proto3" json:"average_latency,omitempty"`
	// contains filtered or unexported fields
}

func (*Summary) Descriptor deprecated added in v0.10.0

func (*Summary) Descriptor() ([]byte, []int)

Deprecated: Use Summary.ProtoReflect.Descriptor instead.

func (*Summary) GetAverageLatency added in v0.10.0

func (x *Summary) GetAverageLatency() float64

func (*Summary) GetFailureRequests added in v0.10.0

func (x *Summary) GetFailureRequests() int64

func (*Summary) GetMethod added in v0.10.0

func (x *Summary) GetMethod() string

func (*Summary) GetSuccessRequests added in v0.10.0

func (x *Summary) GetSuccessRequests() int64

func (*Summary) GetTotalRequests added in v0.10.0

func (x *Summary) GetTotalRequests() int64

func (*Summary) ProtoMessage added in v0.10.0

func (*Summary) ProtoMessage()

func (*Summary) ProtoReflect added in v0.10.0

func (x *Summary) ProtoReflect() protoreflect.Message

func (*Summary) Reset added in v0.10.0

func (x *Summary) Reset()

func (*Summary) String added in v0.10.0

func (x *Summary) String() string

type UnimplementedAPIUsageServiceServer added in v0.10.0

type UnimplementedAPIUsageServiceServer struct {
}

UnimplementedAPIUsageServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAPIUsageServiceServer) GetAggregatedSummary added in v0.10.0

type UnimplementedCollectionInternalServiceServer

type UnimplementedCollectionInternalServiceServer struct {
}

UnimplementedCollectionInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCollectionInternalServiceServer) CreateUsage

type UnsafeAPIUsageServiceServer added in v0.10.0

type UnsafeAPIUsageServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAPIUsageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIUsageServiceServer will result in compilation errors.

type UnsafeCollectionInternalServiceServer

type UnsafeCollectionInternalServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCollectionInternalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectionInternalServiceServer will result in compilation errors.

type Usage

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

func (*Usage) Descriptor deprecated

func (*Usage) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) ProtoMessage

func (*Usage) ProtoMessage()

func (*Usage) ProtoReflect

func (x *Usage) ProtoReflect() protoreflect.Message

func (*Usage) Reset

func (x *Usage) Reset()

func (*Usage) String

func (x *Usage) String() string

type UsageRecord

type UsageRecord struct {

	// user ID is the internal user ID.
	UserId       string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Tenant       string `protobuf:"bytes,2,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Organization string `protobuf:"bytes,3,opt,name=organization,proto3" json:"organization,omitempty"`
	Project      string `protobuf:"bytes,4,opt,name=project,proto3" json:"project,omitempty"`
	ApiMethod    string `protobuf:"bytes,5,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"`
	StatusCode   int32  `protobuf:"varint,6,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Timestamp    int64  `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	LatencyMs    int32  `protobuf:"varint,8,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
	// contains filtered or unexported fields
}

func (*UsageRecord) Descriptor deprecated

func (*UsageRecord) Descriptor() ([]byte, []int)

Deprecated: Use UsageRecord.ProtoReflect.Descriptor instead.

func (*UsageRecord) GetApiMethod

func (x *UsageRecord) GetApiMethod() string

func (*UsageRecord) GetLatencyMs

func (x *UsageRecord) GetLatencyMs() int32

func (*UsageRecord) GetOrganization

func (x *UsageRecord) GetOrganization() string

func (*UsageRecord) GetProject

func (x *UsageRecord) GetProject() string

func (*UsageRecord) GetStatusCode

func (x *UsageRecord) GetStatusCode() int32

func (*UsageRecord) GetTenant

func (x *UsageRecord) GetTenant() string

func (*UsageRecord) GetTimestamp

func (x *UsageRecord) GetTimestamp() int64

func (*UsageRecord) GetUserId added in v0.9.0

func (x *UsageRecord) GetUserId() string

func (*UsageRecord) ProtoMessage

func (*UsageRecord) ProtoMessage()

func (*UsageRecord) ProtoReflect

func (x *UsageRecord) ProtoReflect() protoreflect.Message

func (*UsageRecord) Reset

func (x *UsageRecord) Reset()

func (*UsageRecord) String

func (x *UsageRecord) String() string

Jump to

Keyboard shortcuts

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