relay

package
v0.0.0-...-127139c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: GPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Meter_GetStatus_FullMethodName = "/relay.Meter/GetStatus"
	Meter_OnStatus_FullMethodName  = "/relay.Meter/OnStatus"
)
View Source
const (
	Capacity_OnStatus_FullMethodName = "/relay.Capacity/OnStatus"
)
View Source
const (
	Endpoint_GetClearNetAddress_FullMethodName = "/relay.Endpoint/GetClearNetAddress"
)
View Source
const (
	Information_Get_FullMethodName = "/relay.Information/Get"
)

Variables

View Source
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)

View Source
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)

View Source
var File_relay_proto protoreflect.FileDescriptor
View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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.

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

type UnimplementedEndpointServer

type UnimplementedEndpointServer struct {
}

UnimplementedEndpointServer must be embedded to have forward compatible implementations.

func (UnimplementedEndpointServer) GetClearNetAddress

type UnimplementedInformationServer

type UnimplementedInformationServer struct {
}

UnimplementedInformationServer must be embedded to have forward compatible implementations.

func (UnimplementedInformationServer) Get

type UnimplementedMeterServer

type UnimplementedMeterServer struct {
}

UnimplementedMeterServer must be embedded to have forward compatible implementations.

func (UnimplementedMeterServer) GetStatus

func (UnimplementedMeterServer) OnStatus

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) Descriptor() ([]byte, []int)

Deprecated: Use Usage.ProtoReflect.Descriptor instead.

func (*Usage) GetUsage

func (x *Usage) GetUsage() uint64

func (*Usage) GetUtilizationRate

func (x *Usage) GetUtilizationRate() float32

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

Jump to

Keyboard shortcuts

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