Documentation
¶
Index ¶
- Constants
- Variables
- func DRPCRegisterPeerService(mux drpc.Mux, impl DRPCPeerServiceServer) error
- func NewSRPCPeerServiceHandler(impl SRPCPeerServiceServer, serviceID string) srpc.Handler
- func SRPCRegisterPeerService(mux srpc.Mux, impl SRPCPeerServiceServer) error
- type DRPCPeerServiceClient
- type DRPCPeerServiceDescription
- type DRPCPeerServiceServer
- type DRPCPeerServiceUnimplementedServer
- type DRPCPeerService_GetPeerInfoStream
- type DRPCPeerService_IdentifyClient
- type DRPCPeerService_IdentifyStream
- type GetPeerInfoRequest
- func (m *GetPeerInfoRequest) CloneGenericVT() proto.Message
- func (m *GetPeerInfoRequest) CloneVT() *GetPeerInfoRequest
- func (*GetPeerInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (this *GetPeerInfoRequest) EqualVT(that *GetPeerInfoRequest) bool
- func (x *GetPeerInfoRequest) GetPeerId() string
- func (m *GetPeerInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GetPeerInfoRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *GetPeerInfoRequest) MarshalVT() (dAtA []byte, err error)
- func (*GetPeerInfoRequest) ProtoMessage()
- func (x *GetPeerInfoRequest) ProtoReflect() protoreflect.Message
- func (x *GetPeerInfoRequest) Reset()
- func (m *GetPeerInfoRequest) SizeVT() (n int)
- func (x *GetPeerInfoRequest) String() string
- func (m *GetPeerInfoRequest) UnmarshalVT(dAtA []byte) error
- type GetPeerInfoResponse
- func (m *GetPeerInfoResponse) CloneGenericVT() proto.Message
- func (m *GetPeerInfoResponse) CloneVT() *GetPeerInfoResponse
- func (*GetPeerInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (this *GetPeerInfoResponse) EqualVT(that *GetPeerInfoResponse) bool
- func (x *GetPeerInfoResponse) GetLocalPeers() []*PeerInfo
- func (m *GetPeerInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *GetPeerInfoResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *GetPeerInfoResponse) MarshalVT() (dAtA []byte, err error)
- func (*GetPeerInfoResponse) ProtoMessage()
- func (x *GetPeerInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetPeerInfoResponse) Reset()
- func (m *GetPeerInfoResponse) SizeVT() (n int)
- func (x *GetPeerInfoResponse) String() string
- func (m *GetPeerInfoResponse) UnmarshalVT(dAtA []byte) error
- type IdentifyRequest
- func (m *IdentifyRequest) CloneGenericVT() proto.Message
- func (m *IdentifyRequest) CloneVT() *IdentifyRequest
- func (*IdentifyRequest) Descriptor() ([]byte, []int)deprecated
- func (this *IdentifyRequest) EqualVT(that *IdentifyRequest) bool
- func (x *IdentifyRequest) GetConfig() *controller.Config
- func (m *IdentifyRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IdentifyRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *IdentifyRequest) MarshalVT() (dAtA []byte, err error)
- func (*IdentifyRequest) ProtoMessage()
- func (x *IdentifyRequest) ProtoReflect() protoreflect.Message
- func (x *IdentifyRequest) Reset()
- func (m *IdentifyRequest) SizeVT() (n int)
- func (x *IdentifyRequest) String() string
- func (m *IdentifyRequest) UnmarshalVT(dAtA []byte) error
- type IdentifyResponse
- func (m *IdentifyResponse) CloneGenericVT() proto.Message
- func (m *IdentifyResponse) CloneVT() *IdentifyResponse
- func (*IdentifyResponse) Descriptor() ([]byte, []int)deprecated
- func (this *IdentifyResponse) EqualVT(that *IdentifyResponse) bool
- func (x *IdentifyResponse) GetControllerStatus() exec.ControllerStatus
- func (m *IdentifyResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *IdentifyResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *IdentifyResponse) MarshalVT() (dAtA []byte, err error)
- func (*IdentifyResponse) ProtoMessage()
- func (x *IdentifyResponse) ProtoReflect() protoreflect.Message
- func (x *IdentifyResponse) Reset()
- func (m *IdentifyResponse) SizeVT() (n int)
- func (x *IdentifyResponse) String() string
- func (m *IdentifyResponse) UnmarshalVT(dAtA []byte) error
- type PeerInfo
- func (m *PeerInfo) CloneGenericVT() proto.Message
- func (m *PeerInfo) CloneVT() *PeerInfo
- func (*PeerInfo) Descriptor() ([]byte, []int)deprecated
- func (this *PeerInfo) EqualVT(that *PeerInfo) bool
- func (x *PeerInfo) GetPeerId() string
- func (m *PeerInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *PeerInfo) MarshalToVT(dAtA []byte) (int, error)
- func (m *PeerInfo) MarshalVT() (dAtA []byte, err error)
- func (*PeerInfo) ProtoMessage()
- func (x *PeerInfo) ProtoReflect() protoreflect.Message
- func (x *PeerInfo) Reset()
- func (m *PeerInfo) SizeVT() (n int)
- func (x *PeerInfo) String() string
- func (m *PeerInfo) UnmarshalVT(dAtA []byte) error
- type SRPCPeerServiceClient
- type SRPCPeerServiceHandler
- func (SRPCPeerServiceHandler) GetMethodIDs() []string
- func (d *SRPCPeerServiceHandler) GetServiceID() string
- func (d *SRPCPeerServiceHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCPeerServiceHandler) InvokeMethod_GetPeerInfo(impl SRPCPeerServiceServer, strm srpc.Stream) error
- func (SRPCPeerServiceHandler) InvokeMethod_Identify(impl SRPCPeerServiceServer, strm srpc.Stream) error
- type SRPCPeerServiceServer
- type SRPCPeerServiceUnimplementedServer
- type SRPCPeerService_GetPeerInfoStream
- type SRPCPeerService_IdentifyClient
- type SRPCPeerService_IdentifyStream
Constants ¶
const SRPCPeerServiceServiceID = "peer.api.PeerService"
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var File_github_com_aperturerobotics_bifrost_peer_api_api_proto protoreflect.FileDescriptor
Functions ¶
func DRPCRegisterPeerService ¶
func DRPCRegisterPeerService(mux drpc.Mux, impl DRPCPeerServiceServer) error
func NewSRPCPeerServiceHandler ¶ added in v0.7.2
func NewSRPCPeerServiceHandler(impl SRPCPeerServiceServer, serviceID string) srpc.Handler
NewSRPCPeerServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: peer.api.PeerService
func SRPCRegisterPeerService ¶ added in v0.3.0
func SRPCRegisterPeerService(mux srpc.Mux, impl SRPCPeerServiceServer) error
SRPCRegisterPeerService registers the implementation with the mux. Uses the default serviceID: peer.api.PeerService
Types ¶
type DRPCPeerServiceClient ¶
type DRPCPeerServiceClient interface { DRPCConn() drpc.Conn Identify(ctx context.Context, in *IdentifyRequest) (DRPCPeerService_IdentifyClient, error) GetPeerInfo(ctx context.Context, in *GetPeerInfoRequest) (*GetPeerInfoResponse, error) }
func NewDRPCPeerServiceClient ¶
func NewDRPCPeerServiceClient(cc drpc.Conn) DRPCPeerServiceClient
type DRPCPeerServiceDescription ¶
type DRPCPeerServiceDescription struct{}
func (DRPCPeerServiceDescription) NumMethods ¶
func (DRPCPeerServiceDescription) NumMethods() int
type DRPCPeerServiceServer ¶
type DRPCPeerServiceServer interface { Identify(*IdentifyRequest, DRPCPeerService_IdentifyStream) error GetPeerInfo(context.Context, *GetPeerInfoRequest) (*GetPeerInfoResponse, error) }
type DRPCPeerServiceUnimplementedServer ¶
type DRPCPeerServiceUnimplementedServer struct{}
func (*DRPCPeerServiceUnimplementedServer) GetPeerInfo ¶
func (s *DRPCPeerServiceUnimplementedServer) GetPeerInfo(context.Context, *GetPeerInfoRequest) (*GetPeerInfoResponse, error)
func (*DRPCPeerServiceUnimplementedServer) Identify ¶
func (s *DRPCPeerServiceUnimplementedServer) Identify(*IdentifyRequest, DRPCPeerService_IdentifyStream) error
type DRPCPeerService_GetPeerInfoStream ¶
type DRPCPeerService_GetPeerInfoStream interface { drpc.Stream SendAndClose(*GetPeerInfoResponse) error }
type DRPCPeerService_IdentifyClient ¶
type DRPCPeerService_IdentifyClient interface { drpc.Stream Recv() (*IdentifyResponse, error) }
type DRPCPeerService_IdentifyStream ¶
type DRPCPeerService_IdentifyStream interface { drpc.Stream Send(*IdentifyResponse) error }
type GetPeerInfoRequest ¶
type GetPeerInfoRequest struct { // PeerId restricts the response to a specific peer ID. PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` // contains filtered or unexported fields }
GetPeerInfoRequest is the request type for GetPeerInfo.
func (*GetPeerInfoRequest) CloneGenericVT ¶ added in v0.8.3
func (m *GetPeerInfoRequest) CloneGenericVT() proto.Message
func (*GetPeerInfoRequest) CloneVT ¶ added in v0.8.3
func (m *GetPeerInfoRequest) CloneVT() *GetPeerInfoRequest
func (*GetPeerInfoRequest) Descriptor
deprecated
func (*GetPeerInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPeerInfoRequest.ProtoReflect.Descriptor instead.
func (*GetPeerInfoRequest) EqualVT ¶ added in v0.3.0
func (this *GetPeerInfoRequest) EqualVT(that *GetPeerInfoRequest) bool
func (*GetPeerInfoRequest) GetPeerId ¶
func (x *GetPeerInfoRequest) GetPeerId() string
func (*GetPeerInfoRequest) MarshalToSizedBufferVT ¶ added in v0.2.0
func (m *GetPeerInfoRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GetPeerInfoRequest) MarshalToVT ¶ added in v0.2.0
func (m *GetPeerInfoRequest) MarshalToVT(dAtA []byte) (int, error)
func (*GetPeerInfoRequest) MarshalVT ¶ added in v0.2.0
func (m *GetPeerInfoRequest) MarshalVT() (dAtA []byte, err error)
func (*GetPeerInfoRequest) ProtoMessage ¶
func (*GetPeerInfoRequest) ProtoMessage()
func (*GetPeerInfoRequest) ProtoReflect ¶ added in v0.2.0
func (x *GetPeerInfoRequest) ProtoReflect() protoreflect.Message
func (*GetPeerInfoRequest) Reset ¶
func (x *GetPeerInfoRequest) Reset()
func (*GetPeerInfoRequest) SizeVT ¶ added in v0.2.0
func (m *GetPeerInfoRequest) SizeVT() (n int)
func (*GetPeerInfoRequest) String ¶
func (x *GetPeerInfoRequest) String() string
func (*GetPeerInfoRequest) UnmarshalVT ¶ added in v0.2.0
func (m *GetPeerInfoRequest) UnmarshalVT(dAtA []byte) error
type GetPeerInfoResponse ¶
type GetPeerInfoResponse struct { // LocalPeers is the set of peers loaded. LocalPeers []*PeerInfo `protobuf:"bytes,1,rep,name=local_peers,json=localPeers,proto3" json:"local_peers,omitempty"` // contains filtered or unexported fields }
GetPeerInfoResponse is the response type for GetPeerInfo.
func (*GetPeerInfoResponse) CloneGenericVT ¶ added in v0.8.3
func (m *GetPeerInfoResponse) CloneGenericVT() proto.Message
func (*GetPeerInfoResponse) CloneVT ¶ added in v0.8.3
func (m *GetPeerInfoResponse) CloneVT() *GetPeerInfoResponse
func (*GetPeerInfoResponse) Descriptor
deprecated
func (*GetPeerInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPeerInfoResponse.ProtoReflect.Descriptor instead.
func (*GetPeerInfoResponse) EqualVT ¶ added in v0.3.0
func (this *GetPeerInfoResponse) EqualVT(that *GetPeerInfoResponse) bool
func (*GetPeerInfoResponse) GetLocalPeers ¶
func (x *GetPeerInfoResponse) GetLocalPeers() []*PeerInfo
func (*GetPeerInfoResponse) MarshalToSizedBufferVT ¶ added in v0.2.0
func (m *GetPeerInfoResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*GetPeerInfoResponse) MarshalToVT ¶ added in v0.2.0
func (m *GetPeerInfoResponse) MarshalToVT(dAtA []byte) (int, error)
func (*GetPeerInfoResponse) MarshalVT ¶ added in v0.2.0
func (m *GetPeerInfoResponse) MarshalVT() (dAtA []byte, err error)
func (*GetPeerInfoResponse) ProtoMessage ¶
func (*GetPeerInfoResponse) ProtoMessage()
func (*GetPeerInfoResponse) ProtoReflect ¶ added in v0.2.0
func (x *GetPeerInfoResponse) ProtoReflect() protoreflect.Message
func (*GetPeerInfoResponse) Reset ¶
func (x *GetPeerInfoResponse) Reset()
func (*GetPeerInfoResponse) SizeVT ¶ added in v0.2.0
func (m *GetPeerInfoResponse) SizeVT() (n int)
func (*GetPeerInfoResponse) String ¶
func (x *GetPeerInfoResponse) String() string
func (*GetPeerInfoResponse) UnmarshalVT ¶ added in v0.2.0
func (m *GetPeerInfoResponse) UnmarshalVT(dAtA []byte) error
type IdentifyRequest ¶
type IdentifyRequest struct { // Config is the request to configure the peer controller. Config *controller.Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
IdentifyRequest is a request to load an identity.
func (*IdentifyRequest) CloneGenericVT ¶ added in v0.8.3
func (m *IdentifyRequest) CloneGenericVT() proto.Message
func (*IdentifyRequest) CloneVT ¶ added in v0.8.3
func (m *IdentifyRequest) CloneVT() *IdentifyRequest
func (*IdentifyRequest) Descriptor
deprecated
func (*IdentifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use IdentifyRequest.ProtoReflect.Descriptor instead.
func (*IdentifyRequest) EqualVT ¶ added in v0.3.0
func (this *IdentifyRequest) EqualVT(that *IdentifyRequest) bool
func (*IdentifyRequest) GetConfig ¶
func (x *IdentifyRequest) GetConfig() *controller.Config
func (*IdentifyRequest) MarshalToSizedBufferVT ¶ added in v0.2.0
func (m *IdentifyRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IdentifyRequest) MarshalToVT ¶ added in v0.2.0
func (m *IdentifyRequest) MarshalToVT(dAtA []byte) (int, error)
func (*IdentifyRequest) MarshalVT ¶ added in v0.2.0
func (m *IdentifyRequest) MarshalVT() (dAtA []byte, err error)
func (*IdentifyRequest) ProtoMessage ¶
func (*IdentifyRequest) ProtoMessage()
func (*IdentifyRequest) ProtoReflect ¶ added in v0.2.0
func (x *IdentifyRequest) ProtoReflect() protoreflect.Message
func (*IdentifyRequest) Reset ¶
func (x *IdentifyRequest) Reset()
func (*IdentifyRequest) SizeVT ¶ added in v0.2.0
func (m *IdentifyRequest) SizeVT() (n int)
func (*IdentifyRequest) String ¶
func (x *IdentifyRequest) String() string
func (*IdentifyRequest) UnmarshalVT ¶ added in v0.2.0
func (m *IdentifyRequest) UnmarshalVT(dAtA []byte) error
type IdentifyResponse ¶
type IdentifyResponse struct { // ControllerStatus is the status of the peer controller. ControllerStatus exec.ControllerStatus `` /* 148-byte string literal not displayed */ // contains filtered or unexported fields }
IdentifyResponse is a response to an identify request.
func (*IdentifyResponse) CloneGenericVT ¶ added in v0.8.3
func (m *IdentifyResponse) CloneGenericVT() proto.Message
func (*IdentifyResponse) CloneVT ¶ added in v0.8.3
func (m *IdentifyResponse) CloneVT() *IdentifyResponse
func (*IdentifyResponse) Descriptor
deprecated
func (*IdentifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use IdentifyResponse.ProtoReflect.Descriptor instead.
func (*IdentifyResponse) EqualVT ¶ added in v0.3.0
func (this *IdentifyResponse) EqualVT(that *IdentifyResponse) bool
func (*IdentifyResponse) GetControllerStatus ¶
func (x *IdentifyResponse) GetControllerStatus() exec.ControllerStatus
func (*IdentifyResponse) MarshalToSizedBufferVT ¶ added in v0.2.0
func (m *IdentifyResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*IdentifyResponse) MarshalToVT ¶ added in v0.2.0
func (m *IdentifyResponse) MarshalToVT(dAtA []byte) (int, error)
func (*IdentifyResponse) MarshalVT ¶ added in v0.2.0
func (m *IdentifyResponse) MarshalVT() (dAtA []byte, err error)
func (*IdentifyResponse) ProtoMessage ¶
func (*IdentifyResponse) ProtoMessage()
func (*IdentifyResponse) ProtoReflect ¶ added in v0.2.0
func (x *IdentifyResponse) ProtoReflect() protoreflect.Message
func (*IdentifyResponse) Reset ¶
func (x *IdentifyResponse) Reset()
func (*IdentifyResponse) SizeVT ¶ added in v0.2.0
func (m *IdentifyResponse) SizeVT() (n int)
func (*IdentifyResponse) String ¶
func (x *IdentifyResponse) String() string
func (*IdentifyResponse) UnmarshalVT ¶ added in v0.2.0
func (m *IdentifyResponse) UnmarshalVT(dAtA []byte) error
type PeerInfo ¶
type PeerInfo struct { // PeerId is the b58 peer ID. PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` // contains filtered or unexported fields }
PeerInfo is basic information about a peer.
func NewPeerInfo ¶
NewPeerInfo builds peer info from a peer.
func (*PeerInfo) CloneGenericVT ¶ added in v0.8.3
func (*PeerInfo) Descriptor
deprecated
func (*PeerInfo) MarshalToSizedBufferVT ¶ added in v0.2.0
func (*PeerInfo) MarshalToVT ¶ added in v0.2.0
func (*PeerInfo) ProtoMessage ¶
func (*PeerInfo) ProtoMessage()
func (*PeerInfo) ProtoReflect ¶ added in v0.2.0
func (x *PeerInfo) ProtoReflect() protoreflect.Message
func (*PeerInfo) UnmarshalVT ¶ added in v0.2.0
type SRPCPeerServiceClient ¶ added in v0.3.0
type SRPCPeerServiceClient interface { SRPCClient() srpc.Client Identify(ctx context.Context, in *IdentifyRequest) (SRPCPeerService_IdentifyClient, error) GetPeerInfo(ctx context.Context, in *GetPeerInfoRequest) (*GetPeerInfoResponse, error) }
func NewSRPCPeerServiceClient ¶ added in v0.3.0
func NewSRPCPeerServiceClient(cc srpc.Client) SRPCPeerServiceClient
func NewSRPCPeerServiceClientWithServiceID ¶ added in v0.7.2
func NewSRPCPeerServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCPeerServiceClient
type SRPCPeerServiceHandler ¶ added in v0.3.0
type SRPCPeerServiceHandler struct {
// contains filtered or unexported fields
}
func (SRPCPeerServiceHandler) GetMethodIDs ¶ added in v0.3.0
func (SRPCPeerServiceHandler) GetMethodIDs() []string
func (*SRPCPeerServiceHandler) GetServiceID ¶ added in v0.3.0
func (d *SRPCPeerServiceHandler) GetServiceID() string
func (*SRPCPeerServiceHandler) InvokeMethod ¶ added in v0.3.0
func (SRPCPeerServiceHandler) InvokeMethod_GetPeerInfo ¶ added in v0.3.0
func (SRPCPeerServiceHandler) InvokeMethod_GetPeerInfo(impl SRPCPeerServiceServer, strm srpc.Stream) error
func (SRPCPeerServiceHandler) InvokeMethod_Identify ¶ added in v0.3.0
func (SRPCPeerServiceHandler) InvokeMethod_Identify(impl SRPCPeerServiceServer, strm srpc.Stream) error
type SRPCPeerServiceServer ¶ added in v0.3.0
type SRPCPeerServiceServer interface { Identify(*IdentifyRequest, SRPCPeerService_IdentifyStream) error GetPeerInfo(context.Context, *GetPeerInfoRequest) (*GetPeerInfoResponse, error) }
type SRPCPeerServiceUnimplementedServer ¶ added in v0.3.0
type SRPCPeerServiceUnimplementedServer struct{}
func (*SRPCPeerServiceUnimplementedServer) GetPeerInfo ¶ added in v0.3.0
func (s *SRPCPeerServiceUnimplementedServer) GetPeerInfo(context.Context, *GetPeerInfoRequest) (*GetPeerInfoResponse, error)
func (*SRPCPeerServiceUnimplementedServer) Identify ¶ added in v0.3.0
func (s *SRPCPeerServiceUnimplementedServer) Identify(*IdentifyRequest, SRPCPeerService_IdentifyStream) error
type SRPCPeerService_GetPeerInfoStream ¶ added in v0.3.0
type SRPCPeerService_IdentifyClient ¶ added in v0.3.0
type SRPCPeerService_IdentifyClient interface { srpc.Stream Recv() (*IdentifyResponse, error) RecvTo(*IdentifyResponse) error }
type SRPCPeerService_IdentifyStream ¶ added in v0.3.0
type SRPCPeerService_IdentifyStream interface { srpc.Stream Send(*IdentifyResponse) error SendAndClose(*IdentifyResponse) error }