Documentation ¶
Index ¶
- func RegisterAsGRPCServer(s BifrostAPIServer, grpcServer *grpc.Server)
- type API
- func (a *API) AcceptStream(serv stream_grpc.StreamService_AcceptStreamServer) error
- func (a *API) DialStream(serv stream_grpc.StreamService_DialStreamServer) error
- func (a *API) ForwardStreams(req *stream_grpc.ForwardStreamsRequest, ...) error
- func (a *API) GetPeerInfo(ctx context.Context, req *peer_grpc.GetPeerInfoRequest) (*peer_grpc.GetPeerInfoResponse, error)
- func (a *API) Identify(req *peer_grpc.IdentifyRequest, serv peer_grpc.PeerService_IdentifyServer) error
- func (a *API) ListenStreams(req *stream_grpc.ListenStreamsRequest, ...) error
- func (a *API) RegisterAsGRPCServer(grpcServer *grpc.Server)
- func (a *API) Subscribe(serv pubsub_grpc.PubSubService_SubscribeServer) error
- type BifrostAPIClient
- type BifrostAPIServer
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type ControllerBusAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAsGRPCServer ¶
func RegisterAsGRPCServer(s BifrostAPIServer, grpcServer *grpc.Server)
RegisterAsGRPCServer registers a server with a grpc server.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API implements the GRPC API.
func (*API) AcceptStream ¶
func (a *API) AcceptStream(serv stream_grpc.StreamService_AcceptStreamServer) error
AcceptStream accepts an incoming stream. Stream data is sent over the request / response streams.
func (*API) DialStream ¶
func (a *API) DialStream(serv stream_grpc.StreamService_DialStreamServer) error
DialStream dials a outgoing stream. Stream data is sent over the request / response streams.
func (*API) ForwardStreams ¶
func (a *API) ForwardStreams( req *stream_grpc.ForwardStreamsRequest, serv stream_grpc.StreamService_ForwardStreamsServer, ) 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_grpc.GetPeerInfoRequest, ) (*peer_grpc.GetPeerInfoResponse, error)
GetPeerInfo returns the peer information
func (*API) Identify ¶
func (a *API) Identify( req *peer_grpc.IdentifyRequest, serv peer_grpc.PeerService_IdentifyServer, ) error
Identify loads and manages a private key identity.
func (*API) ListenStreams ¶
func (a *API) ListenStreams( req *stream_grpc.ListenStreamsRequest, serv stream_grpc.StreamService_ListenStreamsServer, ) error
ListenStreams listens for streams on the multiaddress.
func (*API) RegisterAsGRPCServer ¶
RegisterAsGRPCServer registers the API to the GRPC instance.
func (*API) Subscribe ¶
func (a *API) Subscribe(serv pubsub_grpc.PubSubService_SubscribeServer) error
Subscribe subscribes to a pubsub channel.
TODO: move this code to pubsub/grpc/grpc.go under API
type BifrostAPIClient ¶
type BifrostAPIClient interface { stream_grpc.StreamServiceClient peer_grpc.PeerServiceClient bus_grpc.ControllerBusServiceClient pubsub_grpc.PubSubServiceClient }
BifrostAPIClient is the bifrost daemon client interface.
func NewBifrostAPIClient ¶
func NewBifrostAPIClient(cc *grpc.ClientConn) BifrostAPIClient
NewBifrostAPIClient constructs a new bifrost daemon client.
type BifrostAPIServer ¶
type BifrostAPIServer interface { stream_grpc.StreamServiceServer peer_grpc.PeerServiceServer pubsub_grpc.PubSubServiceServer }
BifrostAPIServer is the bifrost daemon server interface.
type Config ¶
type Config struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Config configures the GRPC API.
func (*Config) Descriptor ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()