peer_api

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SRPCPeerServiceServiceID = "peer.api.PeerService"

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
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) Method

func (DRPCPeerServiceDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

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 (*DRPCPeerServiceUnimplementedServer) Identify

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) CloneMessageVT added in v0.15.6

func (m *GetPeerInfoRequest) CloneMessageVT() 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) EqualMessageVT added in v0.15.6

func (this *GetPeerInfoRequest) EqualMessageVT(thatMsg proto.Message) bool

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) CloneMessageVT added in v0.15.6

func (m *GetPeerInfoResponse) CloneMessageVT() proto.Message

func (*GetPeerInfoResponse) CloneVT added in v0.8.3

func (*GetPeerInfoResponse) Descriptor deprecated

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

Deprecated: Use GetPeerInfoResponse.ProtoReflect.Descriptor instead.

func (*GetPeerInfoResponse) EqualMessageVT added in v0.15.6

func (this *GetPeerInfoResponse) EqualMessageVT(thatMsg proto.Message) bool

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) CloneMessageVT added in v0.15.6

func (m *IdentifyRequest) CloneMessageVT() 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) EqualMessageVT added in v0.15.6

func (this *IdentifyRequest) EqualMessageVT(thatMsg proto.Message) bool

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) CloneMessageVT added in v0.15.6

func (m *IdentifyResponse) CloneMessageVT() 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) EqualMessageVT added in v0.15.6

func (this *IdentifyResponse) EqualMessageVT(thatMsg proto.Message) bool

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

func NewPeerInfo(p peer.Peer) (*PeerInfo, error)

NewPeerInfo builds peer info from a peer.

func (*PeerInfo) CloneMessageVT added in v0.15.6

func (m *PeerInfo) CloneMessageVT() proto.Message

func (*PeerInfo) CloneVT added in v0.8.3

func (m *PeerInfo) CloneVT() *PeerInfo

func (*PeerInfo) Descriptor deprecated

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

Deprecated: Use PeerInfo.ProtoReflect.Descriptor instead.

func (*PeerInfo) EqualMessageVT added in v0.15.6

func (this *PeerInfo) EqualMessageVT(thatMsg proto.Message) bool

func (*PeerInfo) EqualVT added in v0.3.0

func (this *PeerInfo) EqualVT(that *PeerInfo) bool

func (*PeerInfo) GetPeerId

func (x *PeerInfo) GetPeerId() string

func (*PeerInfo) MarshalToSizedBufferVT added in v0.2.0

func (m *PeerInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PeerInfo) MarshalToVT added in v0.2.0

func (m *PeerInfo) MarshalToVT(dAtA []byte) (int, error)

func (*PeerInfo) MarshalVT added in v0.2.0

func (m *PeerInfo) MarshalVT() (dAtA []byte, err error)

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) ProtoReflect added in v0.2.0

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

func (*PeerInfo) Reset

func (x *PeerInfo) Reset()

func (*PeerInfo) SizeVT added in v0.2.0

func (m *PeerInfo) SizeVT() (n int)

func (*PeerInfo) String

func (x *PeerInfo) String() string

func (*PeerInfo) UnmarshalVT added in v0.2.0

func (m *PeerInfo) UnmarshalVT(dAtA []byte) error

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 (d *SRPCPeerServiceHandler) InvokeMethod(
	serviceID, methodID string,
	strm srpc.Stream,
) (bool, error)

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 (*SRPCPeerServiceUnimplementedServer) Identify added in v0.3.0

type SRPCPeerService_GetPeerInfoStream added in v0.3.0

type SRPCPeerService_GetPeerInfoStream interface {
	srpc.Stream
}

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
}

Jump to

Keyboard shortcuts

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