Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterResourceUsageServiceServer(s grpc.ServiceRegistrar, srv ResourceUsageServiceServer)
- type AccessRequestsUsage
- func (*AccessRequestsUsage) Descriptor() ([]byte, []int)deprecated
- func (x *AccessRequestsUsage) GetMonthlyLimit() int32
- func (x *AccessRequestsUsage) GetMonthlyUsed() int32
- func (*AccessRequestsUsage) ProtoMessage()
- func (x *AccessRequestsUsage) ProtoReflect() protoreflect.Message
- func (x *AccessRequestsUsage) Reset()
- func (x *AccessRequestsUsage) String() string
- type AccountUsageType
- func (AccountUsageType) Descriptor() protoreflect.EnumDescriptor
- func (x AccountUsageType) Enum() *AccountUsageType
- func (AccountUsageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x AccountUsageType) Number() protoreflect.EnumNumber
- func (x AccountUsageType) String() string
- func (AccountUsageType) Type() protoreflect.EnumType
- type DevicesUsage
- func (*DevicesUsage) Descriptor() ([]byte, []int)deprecated
- func (x *DevicesUsage) GetDevicesInUse() int32
- func (x *DevicesUsage) GetDevicesUsageLimit() int32
- func (*DevicesUsage) ProtoMessage()
- func (x *DevicesUsage) ProtoReflect() protoreflect.Message
- func (x *DevicesUsage) Reset()
- func (x *DevicesUsage) String() string
- type GetUsageRequest
- type GetUsageResponse
- func (*GetUsageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsageResponse) GetAccessRequests() *AccessRequestsUsage
- func (x *GetUsageResponse) GetAccountUsageType() AccountUsageType
- func (x *GetUsageResponse) GetDevicesUsage() *DevicesUsage
- func (*GetUsageResponse) ProtoMessage()
- func (x *GetUsageResponse) ProtoReflect() protoreflect.Message
- func (x *GetUsageResponse) Reset()
- func (x *GetUsageResponse) String() string
- type ResourceUsageServiceClient
- type ResourceUsageServiceServer
- type UnimplementedResourceUsageServiceServer
- type UnsafeResourceUsageServiceServer
Constants ¶
const (
ResourceUsageService_GetUsage_FullMethodName = "/teleport.resourceusage.v1.ResourceUsageService/GetUsage"
)
Variables ¶
var ( AccountUsageType_name = map[int32]string{ 0: "ACCOUNT_USAGE_TYPE_UNSPECIFIED", 1: "ACCOUNT_USAGE_TYPE_UNLIMITED", 2: "ACCOUNT_USAGE_TYPE_USAGE_BASED", } AccountUsageType_value = map[string]int32{ "ACCOUNT_USAGE_TYPE_UNSPECIFIED": 0, "ACCOUNT_USAGE_TYPE_UNLIMITED": 1, "ACCOUNT_USAGE_TYPE_USAGE_BASED": 2, } )
Enum value maps for AccountUsageType.
var File_teleport_resourceusage_v1_access_requests_proto protoreflect.FileDescriptor
var File_teleport_resourceusage_v1_account_usage_type_proto protoreflect.FileDescriptor
var File_teleport_resourceusage_v1_device_trust_proto protoreflect.FileDescriptor
var File_teleport_resourceusage_v1_resourceusage_service_proto protoreflect.FileDescriptor
var ResourceUsageService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "teleport.resourceusage.v1.ResourceUsageService", HandlerType: (*ResourceUsageServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsage", Handler: _ResourceUsageService_GetUsage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "teleport/resourceusage/v1/resourceusage_service.proto", }
ResourceUsageService_ServiceDesc is the grpc.ServiceDesc for ResourceUsageService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterResourceUsageServiceServer ¶
func RegisterResourceUsageServiceServer(s grpc.ServiceRegistrar, srv ResourceUsageServiceServer)
Types ¶
type AccessRequestsUsage ¶
type AccessRequestsUsage struct { // MonthlyLimit is the amount of requests that are allowed per month MonthlyLimit int32 `protobuf:"varint,1,opt,name=monthly_limit,json=monthlyLimit,proto3" json:"monthly_limit,omitempty"` // MonthlyUsed is the amount of requests that have been used this month MonthlyUsed int32 `protobuf:"varint,2,opt,name=monthly_used,json=monthlyUsed,proto3" json:"monthly_used,omitempty"` // contains filtered or unexported fields }
AccessRequestsUsage defines the usage limits for access requests. Usage is limited on the basis of access requests used per calendar month.
func (*AccessRequestsUsage) Descriptor
deprecated
func (*AccessRequestsUsage) Descriptor() ([]byte, []int)
Deprecated: Use AccessRequestsUsage.ProtoReflect.Descriptor instead.
func (*AccessRequestsUsage) GetMonthlyLimit ¶
func (x *AccessRequestsUsage) GetMonthlyLimit() int32
func (*AccessRequestsUsage) GetMonthlyUsed ¶
func (x *AccessRequestsUsage) GetMonthlyUsed() int32
func (*AccessRequestsUsage) ProtoMessage ¶
func (*AccessRequestsUsage) ProtoMessage()
func (*AccessRequestsUsage) ProtoReflect ¶
func (x *AccessRequestsUsage) ProtoReflect() protoreflect.Message
func (*AccessRequestsUsage) Reset ¶
func (x *AccessRequestsUsage) Reset()
func (*AccessRequestsUsage) String ¶
func (x *AccessRequestsUsage) String() string
type AccountUsageType ¶
type AccountUsageType int32
AccountUsageType is the type of the underlying account, either limitless or limit-based.
const ( AccountUsageType_ACCOUNT_USAGE_TYPE_UNSPECIFIED AccountUsageType = 0 AccountUsageType_ACCOUNT_USAGE_TYPE_UNLIMITED AccountUsageType = 1 AccountUsageType_ACCOUNT_USAGE_TYPE_USAGE_BASED AccountUsageType = 2 )
func (AccountUsageType) Descriptor ¶
func (AccountUsageType) Descriptor() protoreflect.EnumDescriptor
func (AccountUsageType) Enum ¶
func (x AccountUsageType) Enum() *AccountUsageType
func (AccountUsageType) EnumDescriptor
deprecated
func (AccountUsageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use AccountUsageType.Descriptor instead.
func (AccountUsageType) Number ¶
func (x AccountUsageType) Number() protoreflect.EnumNumber
func (AccountUsageType) String ¶
func (x AccountUsageType) String() string
func (AccountUsageType) Type ¶
func (AccountUsageType) Type() protoreflect.EnumType
type DevicesUsage ¶
type DevicesUsage struct { // Devices usage limit. // Always zero if the account usage type is ACCOUNT_USAGE_TYPE_UNLIMITED. DevicesUsageLimit int32 `protobuf:"varint,1,opt,name=devices_usage_limit,json=devicesUsageLimit,proto3" json:"devices_usage_limit,omitempty"` // Devices in use. // May be greater than [devices_usage_limit] in some cases. // Always zero if the account usage type is ACCOUNT_USAGE_TYPE_UNLIMITED. DevicesInUse int32 `protobuf:"varint,2,opt,name=devices_in_use,json=devicesInUse,proto3" json:"devices_in_use,omitempty"` // contains filtered or unexported fields }
DevicesUsage holds aggregated information about trusted device usage.
func (*DevicesUsage) Descriptor
deprecated
func (*DevicesUsage) Descriptor() ([]byte, []int)
Deprecated: Use DevicesUsage.ProtoReflect.Descriptor instead.
func (*DevicesUsage) GetDevicesInUse ¶
func (x *DevicesUsage) GetDevicesInUse() int32
func (*DevicesUsage) GetDevicesUsageLimit ¶
func (x *DevicesUsage) GetDevicesUsageLimit() int32
func (*DevicesUsage) ProtoMessage ¶
func (*DevicesUsage) ProtoMessage()
func (*DevicesUsage) ProtoReflect ¶
func (x *DevicesUsage) ProtoReflect() protoreflect.Message
func (*DevicesUsage) Reset ¶
func (x *DevicesUsage) Reset()
func (*DevicesUsage) String ¶
func (x *DevicesUsage) String() string
type GetUsageRequest ¶
type GetUsageRequest struct {
// contains filtered or unexported fields
}
GetUsageRequest is the request for GetUsage.
func (*GetUsageRequest) Descriptor
deprecated
func (*GetUsageRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUsageRequest.ProtoReflect.Descriptor instead.
func (*GetUsageRequest) ProtoMessage ¶
func (*GetUsageRequest) ProtoMessage()
func (*GetUsageRequest) ProtoReflect ¶
func (x *GetUsageRequest) ProtoReflect() protoreflect.Message
func (*GetUsageRequest) Reset ¶
func (x *GetUsageRequest) Reset()
func (*GetUsageRequest) String ¶
func (x *GetUsageRequest) String() string
type GetUsageResponse ¶
type GetUsageResponse struct { AccessRequests *AccessRequestsUsage `protobuf:"bytes,1,opt,name=access_requests,json=accessRequests,proto3" json:"access_requests,omitempty"` // Usage type of the underlying account. // UNLIMITED accounts have no usage limits, therefore any numbers should be // disconsidered for those accounts. AccountUsageType AccountUsageType `` /* 160-byte string literal not displayed */ // DevicesUsage contains limits for trusted devices / Device Trust. DevicesUsage *DevicesUsage `protobuf:"bytes,3,opt,name=devices_usage,json=devicesUsage,proto3" json:"devices_usage,omitempty"` // contains filtered or unexported fields }
GetUsageResponse is the response for GetUsage.
func (*GetUsageResponse) Descriptor
deprecated
func (*GetUsageResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUsageResponse.ProtoReflect.Descriptor instead.
func (*GetUsageResponse) GetAccessRequests ¶
func (x *GetUsageResponse) GetAccessRequests() *AccessRequestsUsage
func (*GetUsageResponse) GetAccountUsageType ¶
func (x *GetUsageResponse) GetAccountUsageType() AccountUsageType
func (*GetUsageResponse) GetDevicesUsage ¶
func (x *GetUsageResponse) GetDevicesUsage() *DevicesUsage
func (*GetUsageResponse) ProtoMessage ¶
func (*GetUsageResponse) ProtoMessage()
func (*GetUsageResponse) ProtoReflect ¶
func (x *GetUsageResponse) ProtoReflect() protoreflect.Message
func (*GetUsageResponse) Reset ¶
func (x *GetUsageResponse) Reset()
func (*GetUsageResponse) String ¶
func (x *GetUsageResponse) String() string
type ResourceUsageServiceClient ¶
type ResourceUsageServiceClient interface { // GetUsage returns usage information for all limited resources. GetUsage(ctx context.Context, in *GetUsageRequest, opts ...grpc.CallOption) (*GetUsageResponse, error) }
ResourceUsageServiceClient is the client API for ResourceUsageService 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 NewResourceUsageServiceClient ¶
func NewResourceUsageServiceClient(cc grpc.ClientConnInterface) ResourceUsageServiceClient
type ResourceUsageServiceServer ¶
type ResourceUsageServiceServer interface { // GetUsage returns usage information for all limited resources. GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error) // contains filtered or unexported methods }
ResourceUsageServiceServer is the server API for ResourceUsageService service. All implementations must embed UnimplementedResourceUsageServiceServer for forward compatibility
type UnimplementedResourceUsageServiceServer ¶
type UnimplementedResourceUsageServiceServer struct { }
UnimplementedResourceUsageServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedResourceUsageServiceServer) GetUsage ¶
func (UnimplementedResourceUsageServiceServer) GetUsage(context.Context, *GetUsageRequest) (*GetUsageResponse, error)
type UnsafeResourceUsageServiceServer ¶
type UnsafeResourceUsageServiceServer interface {
// contains filtered or unexported methods
}
UnsafeResourceUsageServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceUsageServiceServer will result in compilation errors.