client

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcClient

func NewGrpcClient(c context.Context, conn *grpc.ClientConn, clientOpts *VwPubClientOpts) (err error)

NewGrpcClient 启动GRPC客户端

func NewStreamClient added in v0.0.6

func NewStreamClient(c context.Context, conn *grpc.ClientConn, clientOpts *VwPubClientOpts, streamDo ActiveStreamFun) (err error)

NewStreamClient 启动自定义流客户端连接

Types

type ActiveStreamFun added in v0.0.6

type ActiveStreamFun func(c context.Context, sessionId string, clientOpts *VwPubClientOpts, stream *pubproto.PubConnect_DoWorkClient)

type VwPubClientOpts

type VwPubClientOpts struct {
	ServerAddr    string
	AppName       string
	CodeId        int
	Version       string
	Secret        string
	SessionId     string
	NsName        string
	PodName       string
	ContainerName string
	RecvHandler   func(d *pubproto.WorkDetail) (pubproto.WorkDetail, error)
	TSL           VwPubClientTsl
	StopSign      chan int
}

type VwPubClientTsl

type VwPubClientTsl struct {
	ServerName  string
	CertContent string
}

Jump to

Keyboard shortcuts

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