bifrost_api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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 NewAPI

func NewAPI(bus bus.Bus, conf *Config) (*API, error)

NewAPI constructs a new instance of the 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

DialStream dials a outgoing stream. Stream data is sent over the request / response streams.

func (*API) ForwardStreams

ForwardStreams forwards streams to the target multiaddress. Handles HandleMountedStream directives by contacting the target.

func (*API) GetPeerInfo

GetPeerInfo returns the peer information

func (*API) Identify

Identify loads and manages a private key identity.

func (*API) ListenStreams

ListenStreams listens for streams on the multiaddress.

func (*API) RegisterAsGRPCServer

func (a *API) RegisterAsGRPCServer(grpcServer *grpc.Server)

RegisterAsGRPCServer registers the API to the GRPC instance.

func (*API) Subscribe

Subscribe subscribes to a pubsub channel.

TODO: move this code to pubsub/grpc/grpc.go under API

type BifrostAPIClient

BifrostAPIClient is the bifrost daemon client interface.

func NewBifrostAPIClient

func NewBifrostAPIClient(cc *grpc.ClientConn) BifrostAPIClient

NewBifrostAPIClient constructs a new bifrost daemon client.

type BifrostAPIServer

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) Descriptor() ([]byte, []int)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type ControllerBusAPI

type ControllerBusAPI = bus_api.API

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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