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

transfer

package module
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Weplanx Transfer

GitHub Workflow Status Release Coveralls github GitHub go.mod Go version Go Report Card GitHub license

A Golang version of client for managing configuration, data transfer, and scheduling distribution collectors.

License

BSD-3-Clause License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogOption added in v1.6.0

type LogOption struct {
	Key         string `msgpack:"key"`
	Description string `msgpack:"description"`
}

type Option

type Option func(x *Transfer)

func SetJetStream added in v1.6.0

func SetJetStream(v nats.JetStreamContext) Option

func SetNamespace added in v1.6.0

func SetNamespace(v string) Option

type Payload

type Payload struct {
	Timestamp time.Time              `msgpack:"timestamp"`
	Data      map[string]interface{} `msgpack:"data"`
	Format    map[string]interface{} `msgpack:"format"`
}

type Transfer

type Transfer struct {
	Namespace string
	Js        nats.JetStreamContext
	KeyValue  nats.KeyValue
}

func New

func New(options ...Option) (x *Transfer, err error)

func (*Transfer) Get

func (x *Transfer) Get(key string) (result map[string]interface{}, err error)

func (*Transfer) Publish

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

func (*Transfer) Remove

func (x *Transfer) Remove(key string) (err error)

func (*Transfer) Set

func (x *Transfer) Set(ctx context.Context, option LogOption) (err error)

func (*Transfer) Update added in v1.8.1

func (x *Transfer) Update(ctx context.Context, option LogOption) (err error)

Jump to

Keyboard shortcuts

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