client

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActivePushMessageChan = make(chan string)

ActivePushMessageChan 主动异步推流到服务端通道

Functions

func ActivePushMsgDo added in v0.0.15

func ActivePushMsgDo(ctx context.Context, appUuid string, stream pubproto.PubConnect_DoWorkClient)

ActivePushMsgDo 主动往服务端发送消息

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
JackTT - Gopher 🇻🇳