bertybridge

package
v2.76.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0, MIT Imports: 37 Imported by: 0

Documentation

Overview

Package bertybridge is the main gomobile entrypoint, used to generate iOS and Android frameworks.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAPIAddrs = config.BertyMobile.DefaultAPIAddrs
	APIConfig       = config.BertyMobile.APIConfig
)

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

func (*Bridge) Close

func (b *Bridge) Close() (err error)

Close Bridge

func (*Bridge) GRPCListenerAddr

func (b *Bridge) GRPCListenerAddr() string

func (*Bridge) GRPCWebListenerAddr

func (b *Bridge) GRPCWebListenerAddr() string

func (*Bridge) GRPCWebSocketListenerAddr

func (b *Bridge) GRPCWebSocketListenerAddr() string

func (*Bridge) GetGRPCAddrFor

func (b *Bridge) GetGRPCAddrFor(protos string) string

GetGRPCAddrFor the given protocols, if not found return an empty string

func (*Bridge) NewGRPCClient

func (b *Bridge) NewGRPCClient() (client *Client, err error)

NewGRPCClient return client service on success

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) UnaryRequest

func (c *Client) UnaryRequest(method string, req []byte) (res []byte, err error)

UnaryRequest request make an unary request to the given method. the request need to be already serialized

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

func (*Config) AddGRPCListener

func (c *Config) AddGRPCListener(addr string)

AddGRPCListener create a grpc listener with the given multiaddr if a normal addr is given, it will listen by default on grpcweb (ex: ":0" -> "/ip4/127.0.0.1/tcp/0/grpcweb")

type NativeLoggerDriver

type NativeLoggerDriver interface {
	Log(level, namespace, message string) error
	LevelEnabler(level string) bool
}

type Protocol

type Protocol struct {
	*Bridge
	// contains filtered or unexported fields
}

func NewProtocolBridge

func NewProtocolBridge(config *ProtocolConfig) (*Protocol, error)

func (*Protocol) Close

func (p *Protocol) Close() (err error)

type ProtocolConfig

type ProtocolConfig struct {
	*Config
	// contains filtered or unexported fields
}

func NewProtocolConfig

func NewProtocolConfig() *ProtocolConfig

func (*ProtocolConfig) AddSwarmListener added in v2.35.0

func (pc *ProtocolConfig) AddSwarmListener(laddr string)

func (*ProtocolConfig) EnableTracing added in v2.67.1

func (pc *ProtocolConfig) EnableTracing()

func (*ProtocolConfig) LogLevel

func (pc *ProtocolConfig) LogLevel(level string)

func (*ProtocolConfig) LoggerDriver

func (pc *ProtocolConfig) LoggerDriver(dLogger NativeLoggerDriver)

func (*ProtocolConfig) RootDirectory added in v2.57.1

func (pc *ProtocolConfig) RootDirectory(dir string)

func (*ProtocolConfig) SetTracingPrefix added in v2.68.0

func (pc *ProtocolConfig) SetTracingPrefix(prefix string)

Jump to

Keyboard shortcuts

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