apprpc

package
v0.0.0-...-a32d5fc Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_RPC_SERVICE_ID = app.ServiceID(0xe49214fa20b35ba8)
)

Variables

This section is empty.

Functions

func CapnprpcLogLevel2zerologLevel

func CapnprpcLogLevel2zerologLevel(logLevel capnprpc.LogLevel) (zerolog.Level, error)

CapnprpcLogLevel2zerologLevel capnproc.LogLevel -> zerolog.Level error : ErrUnknownLogLevel

func NewAppServer

func NewAppServer() capnprpc.App_Server

func ZerologLevel2capnprpcLogLevel

func ZerologLevel2capnprpcLogLevel(logLevel zerolog.Level) (capnprpc.LogLevel, error)

ZerologLevel2capnprpcLogLevel zerolog.Level -> capnprpc.LogLevel error : ErrUnknownLogLevel

Types

type AppRPCClient

type AppRPCClient struct {
	*capnprpc.App
}

AppRPCClient wraps the capnprpc.App in order to provide a more user friendly interface

func NewAppClient

func NewAppClient(serviceId ServiceID) (*AppRPCClient, error)

NewAppClient creates a new App capnp RPC client. An RPCClientSpec config must exist for the specified ServiceID.

NOTE: when the app is clustered, the RPC client will connect to any instance in the cluster It will connect using the following network address : {DomainID}_{AppID}

func NewAppClientForAddr

func NewAppClientForAddr(serviceId ServiceID, networkAddr string) (*AppRPCClient, error)

NewAppClientForAddr works the same as NewAppClient, except that it enables connecting to a specific app instance by network address

func (*AppRPCClient) Close

func (a *AppRPCClient) Close()

Close releases any resources associated with this client. No further calls to the client should be made after calling Close.

func (*AppRPCClient) Configs

func (*AppRPCClient) Id

func (*AppRPCClient) Instance

func (*AppRPCClient) Kill

func (a *AppRPCClient) Kill(ctx context.Context) error

func (*AppRPCClient) LogLevel

func (*AppRPCClient) ReleaseId

func (*AppRPCClient) RpcService

func (a *AppRPCClient) RpcService(ctx context.Context, id ServiceID) capnprpc.App_rpcService_Results_Promise

func (*AppRPCClient) RpcServiceIds

func (*AppRPCClient) Runtime

func (*AppRPCClient) Service

func (a *AppRPCClient) Service(ctx context.Context, id ServiceID) capnprpc.App_service_Results_Promise

func (*AppRPCClient) ServiceIds

func (*AppRPCClient) StartedOn

Jump to

Keyboard shortcuts

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