Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCapacityServer(s grpc.ServiceRegistrar, srv CapacityServer)
- func RegisterEndpointServer(s grpc.ServiceRegistrar, srv EndpointServer)
- func RegisterInformationServer(s grpc.ServiceRegistrar, srv InformationServer)
- func RegisterMeterServer(s grpc.ServiceRegistrar, srv MeterServer)
- type ApiDescription
- func (*ApiDescription) Descriptor() ([]byte, []int)deprecated
- func (x *ApiDescription) GetDescription() string
- func (x *ApiDescription) GetFeatureFlag() uint64
- func (x *ApiDescription) GetTitle() string
- func (*ApiDescription) ProtoMessage()
- func (x *ApiDescription) ProtoReflect() protoreflect.Message
- func (x *ApiDescription) Reset()
- func (x *ApiDescription) String() string
- type CapacityClient
- type CapacityRequest
- type CapacityServer
- type CapacityStatus
- type Capacity_OnStatusClient
- type Capacity_OnStatusServer
- type Empty
- type EndpointClient
- type EndpointRequest
- func (*EndpointRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EndpointRequest) GetCertificate() []byte
- func (x *EndpointRequest) GetNonce() []byte
- func (x *EndpointRequest) GetPubkey() []byte
- func (x *EndpointRequest) GetSignature() []byte
- func (*EndpointRequest) ProtoMessage()
- func (x *EndpointRequest) ProtoReflect() protoreflect.Message
- func (x *EndpointRequest) Reset()
- func (x *EndpointRequest) String() string
- type EndpointResponse
- type EndpointServer
- type InformationClient
- type InformationRequest
- type InformationServer
- type MeterClient
- type MeterServer
- type Meter_OnStatusClient
- type Meter_OnStatusServer
- type StatusRequest
- type UnimplementedCapacityServer
- type UnimplementedEndpointServer
- type UnimplementedInformationServer
- type UnimplementedMeterServer
- type UnsafeCapacityServer
- type UnsafeEndpointServer
- type UnsafeInformationServer
- type UnsafeMeterServer
- type Usage
Constants ¶
const ( Meter_GetStatus_FullMethodName = "/relay.Meter/GetStatus" Meter_OnStatus_FullMethodName = "/relay.Meter/OnStatus" )
const (
Capacity_OnStatus_FullMethodName = "/relay.Capacity/OnStatus"
)
const (
Endpoint_GetClearNetAddress_FullMethodName = "/relay.Endpoint/GetClearNetAddress"
)
const (
Information_Get_FullMethodName = "/relay.Information/Get"
)
Variables ¶
var Capacity_ServiceDesc = grpc.ServiceDesc{ ServiceName: "relay.Capacity", HandlerType: (*CapacityServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "OnStatus", Handler: _Capacity_OnStatus_Handler, ServerStreams: true, }, }, Metadata: "relay.proto", }
Capacity_ServiceDesc is the grpc.ServiceDesc for Capacity service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Endpoint_ServiceDesc = grpc.ServiceDesc{ ServiceName: "relay.Endpoint", HandlerType: (*EndpointServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClearNetAddress", Handler: _Endpoint_GetClearNetAddress_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "relay.proto", }
Endpoint_ServiceDesc is the grpc.ServiceDesc for Endpoint service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_relay_proto protoreflect.FileDescriptor
var Information_ServiceDesc = grpc.ServiceDesc{ ServiceName: "relay.Information", HandlerType: (*InformationServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _Information_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "relay.proto", }
Information_ServiceDesc is the grpc.ServiceDesc for Information service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Meter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "relay.Meter", HandlerType: (*MeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStatus", Handler: _Meter_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "OnStatus", Handler: _Meter_OnStatus_Handler, ServerStreams: true, }, }, Metadata: "relay.proto", }
Meter_ServiceDesc is the grpc.ServiceDesc for Meter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCapacityServer ¶
func RegisterCapacityServer(s grpc.ServiceRegistrar, srv CapacityServer)
func RegisterEndpointServer ¶
func RegisterEndpointServer(s grpc.ServiceRegistrar, srv EndpointServer)
func RegisterInformationServer ¶
func RegisterInformationServer(s grpc.ServiceRegistrar, srv InformationServer)
func RegisterMeterServer ¶
func RegisterMeterServer(s grpc.ServiceRegistrar, srv MeterServer)
Types ¶
type ApiDescription ¶
type ApiDescription struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` FeatureFlag uint64 `protobuf:"varint,3,opt,name=feature_flag,json=featureFlag,proto3" json:"feature_flag,omitempty"` // contains filtered or unexported fields }
func (*ApiDescription) Descriptor
deprecated
func (*ApiDescription) Descriptor() ([]byte, []int)
Deprecated: Use ApiDescription.ProtoReflect.Descriptor instead.
func (*ApiDescription) GetDescription ¶
func (x *ApiDescription) GetDescription() string
func (*ApiDescription) GetFeatureFlag ¶
func (x *ApiDescription) GetFeatureFlag() uint64
func (*ApiDescription) GetTitle ¶
func (x *ApiDescription) GetTitle() string
func (*ApiDescription) ProtoMessage ¶
func (*ApiDescription) ProtoMessage()
func (*ApiDescription) ProtoReflect ¶
func (x *ApiDescription) ProtoReflect() protoreflect.Message
func (*ApiDescription) Reset ¶
func (x *ApiDescription) Reset()
func (*ApiDescription) String ¶
func (x *ApiDescription) String() string
type CapacityClient ¶
type CapacityClient interface {
OnStatus(ctx context.Context, in *CapacityRequest, opts ...grpc.CallOption) (Capacity_OnStatusClient, error)
}
CapacityClient is the client API for Capacity 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 NewCapacityClient ¶
func NewCapacityClient(cc grpc.ClientConnInterface) CapacityClient
type CapacityRequest ¶
type CapacityRequest struct {
// contains filtered or unexported fields
}
func (*CapacityRequest) Descriptor
deprecated
func (*CapacityRequest) Descriptor() ([]byte, []int)
Deprecated: Use CapacityRequest.ProtoReflect.Descriptor instead.
func (*CapacityRequest) ProtoMessage ¶
func (*CapacityRequest) ProtoMessage()
func (*CapacityRequest) ProtoReflect ¶
func (x *CapacityRequest) ProtoReflect() protoreflect.Message
func (*CapacityRequest) Reset ¶
func (x *CapacityRequest) Reset()
func (*CapacityRequest) String ¶
func (x *CapacityRequest) String() string
type CapacityServer ¶
type CapacityServer interface { OnStatus(*CapacityRequest, Capacity_OnStatusServer) error // contains filtered or unexported methods }
CapacityServer is the server API for Capacity service. All implementations must embed UnimplementedCapacityServer for forward compatibility
type CapacityStatus ¶
type CapacityStatus struct { UtilizationRatio float32 `protobuf:"fixed32,1,opt,name=utilization_ratio,json=utilizationRatio,proto3" json:"utilization_ratio,omitempty"` // contains filtered or unexported fields }
func (*CapacityStatus) Descriptor
deprecated
func (*CapacityStatus) Descriptor() ([]byte, []int)
Deprecated: Use CapacityStatus.ProtoReflect.Descriptor instead.
func (*CapacityStatus) GetUtilizationRatio ¶
func (x *CapacityStatus) GetUtilizationRatio() float32
func (*CapacityStatus) ProtoMessage ¶
func (*CapacityStatus) ProtoMessage()
func (*CapacityStatus) ProtoReflect ¶
func (x *CapacityStatus) ProtoReflect() protoreflect.Message
func (*CapacityStatus) Reset ¶
func (x *CapacityStatus) Reset()
func (*CapacityStatus) String ¶
func (x *CapacityStatus) String() string
type Capacity_OnStatusClient ¶
type Capacity_OnStatusClient interface { Recv() (*CapacityStatus, error) grpc.ClientStream }
type Capacity_OnStatusServer ¶
type Capacity_OnStatusServer interface { Send(*CapacityStatus) error grpc.ServerStream }
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type EndpointClient ¶
type EndpointClient interface { // let consumers connect over clearnet GetClearNetAddress(ctx context.Context, in *EndpointRequest, opts ...grpc.CallOption) (*EndpointResponse, error) }
EndpointClient is the client API for Endpoint 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 NewEndpointClient ¶
func NewEndpointClient(cc grpc.ClientConnInterface) EndpointClient
type EndpointRequest ¶
type EndpointRequest struct { Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*EndpointRequest) Descriptor
deprecated
func (*EndpointRequest) Descriptor() ([]byte, []int)
Deprecated: Use EndpointRequest.ProtoReflect.Descriptor instead.
func (*EndpointRequest) GetCertificate ¶
func (x *EndpointRequest) GetCertificate() []byte
func (*EndpointRequest) GetNonce ¶
func (x *EndpointRequest) GetNonce() []byte
func (*EndpointRequest) GetPubkey ¶
func (x *EndpointRequest) GetPubkey() []byte
func (*EndpointRequest) GetSignature ¶
func (x *EndpointRequest) GetSignature() []byte
func (*EndpointRequest) ProtoMessage ¶
func (*EndpointRequest) ProtoMessage()
func (*EndpointRequest) ProtoReflect ¶
func (x *EndpointRequest) ProtoReflect() protoreflect.Message
func (*EndpointRequest) Reset ¶
func (x *EndpointRequest) Reset()
func (*EndpointRequest) String ¶
func (x *EndpointRequest) String() string
type EndpointResponse ¶
type EndpointResponse struct { Url []string `protobuf:"bytes,1,rep,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*EndpointResponse) Descriptor
deprecated
func (*EndpointResponse) Descriptor() ([]byte, []int)
Deprecated: Use EndpointResponse.ProtoReflect.Descriptor instead.
func (*EndpointResponse) GetUrl ¶
func (x *EndpointResponse) GetUrl() []string
func (*EndpointResponse) ProtoMessage ¶
func (*EndpointResponse) ProtoMessage()
func (*EndpointResponse) ProtoReflect ¶
func (x *EndpointResponse) ProtoReflect() protoreflect.Message
func (*EndpointResponse) Reset ¶
func (x *EndpointResponse) Reset()
func (*EndpointResponse) String ¶
func (x *EndpointResponse) String() string
type EndpointServer ¶
type EndpointServer interface { // let consumers connect over clearnet GetClearNetAddress(context.Context, *EndpointRequest) (*EndpointResponse, error) // contains filtered or unexported methods }
EndpointServer is the server API for Endpoint service. All implementations must embed UnimplementedEndpointServer for forward compatibility
type InformationClient ¶
type InformationClient interface {
Get(ctx context.Context, in *InformationRequest, opts ...grpc.CallOption) (*ApiDescription, error)
}
InformationClient is the client API for Information 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 NewInformationClient ¶
func NewInformationClient(cc grpc.ClientConnInterface) InformationClient
type InformationRequest ¶
type InformationRequest struct {
// contains filtered or unexported fields
}
func (*InformationRequest) Descriptor
deprecated
func (*InformationRequest) Descriptor() ([]byte, []int)
Deprecated: Use InformationRequest.ProtoReflect.Descriptor instead.
func (*InformationRequest) ProtoMessage ¶
func (*InformationRequest) ProtoMessage()
func (*InformationRequest) ProtoReflect ¶
func (x *InformationRequest) ProtoReflect() protoreflect.Message
func (*InformationRequest) Reset ¶
func (x *InformationRequest) Reset()
func (*InformationRequest) String ¶
func (x *InformationRequest) String() string
type InformationServer ¶
type InformationServer interface { Get(context.Context, *InformationRequest) (*ApiDescription, error) // contains filtered or unexported methods }
InformationServer is the server API for Information service. All implementations must embed UnimplementedInformationServer for forward compatibility
type MeterClient ¶
type MeterClient interface { GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Usage, error) OnStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (Meter_OnStatusClient, error) }
MeterClient is the client API for Meter 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 NewMeterClient ¶
func NewMeterClient(cc grpc.ClientConnInterface) MeterClient
type MeterServer ¶
type MeterServer interface { GetStatus(context.Context, *StatusRequest) (*Usage, error) OnStatus(*StatusRequest, Meter_OnStatusServer) error // contains filtered or unexported methods }
MeterServer is the server API for Meter service. All implementations must embed UnimplementedMeterServer for forward compatibility
type Meter_OnStatusClient ¶
type Meter_OnStatusClient interface { Recv() (*Usage, error) grpc.ClientStream }
type Meter_OnStatusServer ¶
type Meter_OnStatusServer interface { Send(*Usage) error grpc.ServerStream }
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type UnimplementedCapacityServer ¶
type UnimplementedCapacityServer struct { }
UnimplementedCapacityServer must be embedded to have forward compatible implementations.
func (UnimplementedCapacityServer) OnStatus ¶
func (UnimplementedCapacityServer) OnStatus(*CapacityRequest, Capacity_OnStatusServer) error
type UnimplementedEndpointServer ¶
type UnimplementedEndpointServer struct { }
UnimplementedEndpointServer must be embedded to have forward compatible implementations.
func (UnimplementedEndpointServer) GetClearNetAddress ¶
func (UnimplementedEndpointServer) GetClearNetAddress(context.Context, *EndpointRequest) (*EndpointResponse, error)
type UnimplementedInformationServer ¶
type UnimplementedInformationServer struct { }
UnimplementedInformationServer must be embedded to have forward compatible implementations.
func (UnimplementedInformationServer) Get ¶
func (UnimplementedInformationServer) Get(context.Context, *InformationRequest) (*ApiDescription, error)
type UnimplementedMeterServer ¶
type UnimplementedMeterServer struct { }
UnimplementedMeterServer must be embedded to have forward compatible implementations.
func (UnimplementedMeterServer) GetStatus ¶
func (UnimplementedMeterServer) GetStatus(context.Context, *StatusRequest) (*Usage, error)
func (UnimplementedMeterServer) OnStatus ¶
func (UnimplementedMeterServer) OnStatus(*StatusRequest, Meter_OnStatusServer) error
type UnsafeCapacityServer ¶
type UnsafeCapacityServer interface {
// contains filtered or unexported methods
}
UnsafeCapacityServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CapacityServer will result in compilation errors.
type UnsafeEndpointServer ¶
type UnsafeEndpointServer interface {
// contains filtered or unexported methods
}
UnsafeEndpointServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EndpointServer will result in compilation errors.
type UnsafeInformationServer ¶
type UnsafeInformationServer interface {
// contains filtered or unexported methods
}
UnsafeInformationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to InformationServer will result in compilation errors.
type UnsafeMeterServer ¶
type UnsafeMeterServer interface {
// contains filtered or unexported methods
}
UnsafeMeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MeterServer will result in compilation errors.
type Usage ¶
type Usage struct { Usage uint64 `protobuf:"varint,1,opt,name=usage,proto3" json:"usage,omitempty"` UtilizationRate float32 `protobuf:"fixed32,2,opt,name=utilization_rate,json=utilizationRate,proto3" json:"utilization_rate,omitempty"` // how much of the alloted bandwidth has the bidder used // contains filtered or unexported fields }
func (*Usage) Descriptor
deprecated
func (*Usage) GetUtilizationRate ¶
func (*Usage) ProtoMessage ¶
func (*Usage) ProtoMessage()
func (*Usage) ProtoReflect ¶
func (x *Usage) ProtoReflect() protoreflect.Message