Documentation ¶
Index ¶
- Variables
- func RegisterAsDRPCServer(s BifrostAPIServer, mux drpc.Mux)
- type API
- func (a *API) AcceptStream(serv stream_api.DRPCStreamService_AcceptStreamStream) error
- func (a *API) DialStream(serv stream_api.DRPCStreamService_DialStreamStream) error
- func (a *API) ForwardStreams(req *stream_api.ForwardStreamsRequest, ...) error
- func (a *API) GetPeerInfo(ctx context.Context, req *peer_api.GetPeerInfoRequest) (*peer_api.GetPeerInfoResponse, error)
- func (a *API) Identify(req *peer_api.IdentifyRequest, serv peer_api.DRPCPeerService_IdentifyStream) error
- func (a *API) ListenStreams(req *stream_api.ListenStreamsRequest, ...) error
- func (a *API) RegisterAsDRPCServer(mux drpc.Mux)
- func (a *API) Subscribe(serv pubsub_api.DRPCPubSubService_SubscribeStream) error
- type BifrostAPIClient
- type BifrostAPIServer
- type BusAPI
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetBusConfig() *api.Config
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (m *Config) UnmarshalVT(dAtA []byte) error
- type DRPCBifrostAPIClient
- type DRPCBifrostAPIServer
Constants ¶
This section is empty.
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_daemon_api_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAsDRPCServer ¶ added in v0.1.1
func RegisterAsDRPCServer(s BifrostAPIServer, mux drpc.Mux)
RegisterAsDRPCServer registers a server with a DRPC mux.
Types ¶
type API ¶
type API struct { *BusAPI // contains filtered or unexported fields }
API implements the daemon API.
func (*API) AcceptStream ¶
func (a *API) AcceptStream(serv stream_api.DRPCStreamService_AcceptStreamStream) error
AcceptStream accepts an incoming stream. Stream data is sent over the request / response streams.
func (*API) DialStream ¶
func (a *API) DialStream(serv stream_api.DRPCStreamService_DialStreamStream) error
DialStream dials a outgoing stream. Stream data is sent over the request / response streams.
func (*API) ForwardStreams ¶
func (a *API) ForwardStreams( req *stream_api.ForwardStreamsRequest, serv stream_api.DRPCStreamService_ForwardStreamsStream, ) error
ForwardStreams forwards streams to the target multiaddress. Handles HandleMountedStream directives by contacting the target.
func (*API) GetPeerInfo ¶
func (a *API) GetPeerInfo( ctx context.Context, req *peer_api.GetPeerInfoRequest, ) (*peer_api.GetPeerInfoResponse, error)
GetPeerInfo returns the peer information
func (*API) Identify ¶
func (a *API) Identify( req *peer_api.IdentifyRequest, serv peer_api.DRPCPeerService_IdentifyStream, ) error
Identify loads and manages a private key identity.
func (*API) ListenStreams ¶
func (a *API) ListenStreams( req *stream_api.ListenStreamsRequest, serv stream_api.DRPCStreamService_ListenStreamsStream, ) error
ListenStreams listens for streams on the multiaddress.
func (*API) RegisterAsDRPCServer ¶ added in v0.1.1
RegisterAsDRPCServer registers the API to the DRPC mux.
func (*API) Subscribe ¶
func (a *API) Subscribe(serv pubsub_api.DRPCPubSubService_SubscribeStream) error
Subscribe subscribes to a pubsub channel.
TODO: move this code to pubsub/api
type BifrostAPIClient ¶
type BifrostAPIClient interface { bus_api.DRPCControllerBusServiceClient stream_api.DRPCStreamServiceClient peer_api.DRPCPeerServiceClient pubsub_api.DRPCPubSubServiceClient }
BifrostAPIClient is the bifrost daemon client interface.
func NewBifrostAPIClient ¶
func NewBifrostAPIClient(cc drpc.Conn) BifrostAPIClient
NewBifrostAPIClient constructs a new bifrost api client.
type BifrostAPIServer ¶
type BifrostAPIServer interface { bus_api.DRPCControllerBusServiceServer stream_api.DRPCStreamServiceServer peer_api.DRPCPeerServiceServer pubsub_api.DRPCPubSubServiceServer }
BifrostAPIServer is the bifrost daemon server interface.
type Config ¶
type Config struct { // BusConfig configures the bus api. BusConfig *api.Config `protobuf:"bytes,1,opt,name=bus_config,json=busConfig,proto3" json:"bus_config,omitempty"` // contains filtered or unexported fields }
Config configures the API.
func (*Config) Descriptor
deprecated
func (*Config) GetBusConfig ¶ added in v0.1.1
func (*Config) MarshalToSizedBufferVT ¶ added in v0.2.0
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶ added in v0.2.0
func (x *Config) ProtoReflect() protoreflect.Message
func (*Config) UnmarshalVT ¶ added in v0.2.0
type DRPCBifrostAPIClient ¶ added in v0.1.2
type DRPCBifrostAPIClient = BifrostAPIClient
DRPCBifrostAPIClient is the bifrost daemon client interface.
type DRPCBifrostAPIServer ¶ added in v0.1.2
type DRPCBifrostAPIServer = BifrostAPIServer
DRPCBifrostAPIServer is the bifrost daemon server interface.