client

package
v0.0.0-beta.9-lw Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(serviceName string, serverAddr string, regParams *pb.RegistrationParams) (*grpc.ClientConn, error)

func DefaultRegParams

func DefaultRegParams(sc *SC) (*pb.RegistrationParams, error)

Types

type Logger

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

func NewLogger

func NewLogger(client *pb.SidecarClient, header *pb.Header) *Logger

func (*Logger) Log

func (l *Logger) Log(s string, args ...interface{})

type Response

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

type ResponseJS

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

type SC

type SC struct {
	Logger *Logger
	// contains filtered or unexported fields
}

func InitSidecar

func InitSidecar(serviceName string, regParams *pb.RegistrationParams) (*SC, error)

func (*SC) ProcessSubJSMsgs

func (sc *SC) ProcessSubJSMsgs(ctx context.Context, topic, workQueue string,
	chanSize uint32, f func(*pb.SubJSTopicResponse)) error

func (*SC) ProcessSubMsgs

func (sc *SC) ProcessSubMsgs(ctx context.Context, topic string,
	chanSize uint32, f func(*pb.SubTopicResponse)) error

func (*SC) Pub

func (sc *SC) Pub(ctx context.Context, topic string, data []byte, rb *pb.RetryBehavior) error

func (*SC) PubJS

func (sc *SC) PubJS(ctx context.Context, topic string, workQueue string, data []byte) error

func (*SC) Recv

func (sc *SC) Recv(ctx context.Context, topic string) <-chan *Response

func (*SC) RecvJS

func (sc *SC) RecvJS(ctx context.Context, topic string, workQueue string) <-chan *ResponseJS

func (*SC) Register

func (sc *SC) Register(serviceName string, regParams *pb.RegistrationParams) error

func (*SC) Sub

func (sc *SC) Sub(ctx context.Context, topic string, chanSize uint32) error

func (*SC) SubJS

func (sc *SC) SubJS(ctx context.Context, topic string, workQueue string, chanSize uint32) error

func (*SC) Unsub

func (sc *SC) Unsub(ctx context.Context, topic string) error

func (*SC) UnsubJS

func (sc *SC) UnsubJS(ctx context.Context, topic string, workQueue string) error

Jump to

Keyboard shortcuts

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