Documentation ¶
Index ¶
- func RegisterAsSRPCServer(s BifrostAPIServer, mux srpc.Mux)
- type API
- func (a *API) AcceptStream(serv stream_api.SRPCStreamService_AcceptStreamStream) error
- func (a *API) DialStream(serv stream_api.SRPCStreamService_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.SRPCPeerService_IdentifyStream) error
- func (a *API) ListenStreams(req *stream_api.ListenStreamsRequest, ...) error
- func (a *API) RegisterAsSRPCServer(mux srpc.Mux)
- func (a *API) Subscribe(serv pubsub_api.SRPCPubSubService_SubscribeStream) error
- type BifrostAPIClient
- type BifrostAPIServer
- type BusAPI
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (x *Config) GetBusConfig() *api.Config
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- 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) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- type SRPCBifrostAPIClient
- type SRPCBifrostAPIServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAsSRPCServer ¶ added in v0.4.0
func RegisterAsSRPCServer(s BifrostAPIServer, mux srpc.Mux)
RegisterAsSRPCServer registers a server with a SRPC 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.SRPCStreamService_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.SRPCStreamService_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.SRPCStreamService_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.SRPCPeerService_IdentifyStream, ) error
Identify loads and manages a private key identity.
func (*API) ListenStreams ¶
func (a *API) ListenStreams( req *stream_api.ListenStreamsRequest, serv stream_api.SRPCStreamService_ListenStreamsStream, ) error
ListenStreams listens for streams on the multiaddress.
func (*API) RegisterAsSRPCServer ¶ added in v0.4.0
RegisterAsSRPCServer registers the API to the SRPC mux.
func (*API) Subscribe ¶
func (a *API) Subscribe(serv pubsub_api.SRPCPubSubService_SubscribeStream) error
Subscribe subscribes to a pubsub channel.
TODO: move this code to pubsub/api
type BifrostAPIClient ¶
type BifrostAPIClient interface { bus_api.SRPCControllerBusServiceClient stream_api.SRPCStreamServiceClient peer_api.SRPCPeerServiceClient pubsub_api.SRPCPubSubServiceClient }
BifrostAPIClient is the bifrost daemon client interface.
func NewBifrostAPIClient ¶
func NewBifrostAPIClient(cc srpc.Client) BifrostAPIClient
NewBifrostAPIClient constructs a new bifrost api client.
type BifrostAPIServer ¶
type BifrostAPIServer interface { bus_api.SRPCControllerBusServiceServer stream_api.SRPCStreamServiceServer peer_api.SRPCPeerServiceServer pubsub_api.SRPCPubSubServiceServer }
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:"busConfig,omitempty"` // contains filtered or unexported fields }
Config configures the API.
func (*Config) CloneMessageVT ¶ added in v0.15.6
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶ added in v0.15.6
func (*Config) GetBusConfig ¶ added in v0.1.1
func (*Config) MarshalJSON ¶ added in v0.29.0
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶ added in v0.29.0
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶ added in v0.29.2
func (*Config) MarshalToSizedBufferVT ¶ added in v0.2.0
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalJSON ¶ added in v0.29.0
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶ added in v0.29.0
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶ added in v0.2.0
type SRPCBifrostAPIClient ¶ added in v0.4.0
type SRPCBifrostAPIClient = BifrostAPIClient
SRPCBifrostAPIClient is the bifrost daemon client interface.
type SRPCBifrostAPIServer ¶ added in v0.4.0
type SRPCBifrostAPIServer = BifrostAPIServer
SRPCBifrostAPIServer is the bifrost daemon server interface.