common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpOption added in v1.0.5

type HttpOption struct {
	Url     string                 `msgpack:"url"`
	Headers map[string]string      `msgpack:"headers"`
	Body    map[string]interface{} `msgpack:"body"`
}

type Inject

type Inject struct {
	Values *Values
	Log    *zap.Logger
	Nats   *nats.Conn
	Js     nats.JetStreamContext
	Store  nats.ObjectStore
}

type Job

type Job struct {
	Mode   string `msgpack:"mode"`
	Spec   string `msgpack:"spec"`
	Option Option `msgpack:"option"`

	State `msgpack:"state"`
}

func HttpJob added in v1.0.5

func HttpJob(spec string, option HttpOption) Job

HttpJob HTTP回调

type Nats added in v1.0.5

type Nats struct {
	Hosts []string `yaml:"hosts"`
	Nkey  string   `yaml:"nkey"`
}

type Option added in v1.0.5

type Option interface{}

type State added in v1.0.5

type State struct {
	Next time.Time `msgpack:"next"`
	Prev time.Time `msgpack:"prev"`
}

type Values

type Values struct {
	Namespace string `yaml:"namespace"`
	Debug     bool   `yaml:"debug"`
	Nats      Nats   `yaml:"nats"`
}

func SetValues added in v1.0.5

func SetValues() (values *Values, err error)

SetValues 设置配置

Jump to

Keyboard shortcuts

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