Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLSDto added in v1.1.3

type CLSDto struct {
	// CLS 日志主题 ID
	TopicId string `msgpack:"topic_id" validate:"required"`

	// 写入记录
	Record map[string]string `msgpack:"record" validate:"required"`

	// 时间
	Time time.Time `msgpack:"time" validate:"required"`
}

type InfluxDto added in v1.1.3

type InfluxDto struct {
	// 度量
	Measurement string `msgpack:"measurement" validate:"required"`

	// 标签
	Tags map[string]string `msgpack:"tags" validate:"required"`

	// 字段
	Fields map[string]interface{} `msgpack:"fields" validate:"required"`

	// 时间
	Time time.Time `msgpack:"time" validate:"required"`
}

type Payload added in v1.1.3

type Payload []byte

func NewPayload added in v1.1.3

func NewPayload(data interface{}) (payload Payload, err error)

NewPayload 创建载荷

type Transfer

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

func New

func New(addr string, opts ...grpc.DialOption) (x *Transfer, err error)

New 创建传输器

func (*Transfer) Close

func (x *Transfer) Close() error

func (*Transfer) Create added in v1.1.1

func (x *Transfer) Create(ctx context.Context, key string, topic string, description string) (err error)

Create 创建传输

func (*Transfer) Delete added in v1.1.1

func (x *Transfer) Delete(ctx context.Context, key string) (err error)

Delete 删除传输

func (*Transfer) Get added in v1.1.1

func (x *Transfer) Get(ctx context.Context) (result []*api.Transfer, err error)

Get 获取设置

func (*Transfer) Info

func (x *Transfer) Info(ctx context.Context, key string) (*api.InfoReply, error)

Info 获取日志主题详情

func (*Transfer) Publish

func (x *Transfer) Publish(ctx context.Context, topic string, payload Payload) (err error)

Publish 投递日志

func (*Transfer) Update added in v1.1.1

func (x *Transfer) Update(ctx context.Context, key string, description string) (err error)

Update 更新传输

Jump to

Keyboard shortcuts

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