common

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-3-Clause Imports: 3 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 {
	Method  string                 `json:"method" msgpack:"method"`
	Url     string                 `json:"url" msgpack:"url"`
	Headers map[string]string      `json:"headers" msgpack:"headers"`
	Body    map[string]interface{} `json:"body" msgpack:"body"`
}

type Inject

type Inject struct {
	V        *Values
	Log      *zap.Logger
	Nats     *nats.Conn
	KeyValue nats.KeyValue
}

type Job

type Job struct {
	Key    string      `msgpack:"key"`
	Index  int         `msgpack:"index"`
	Mode   string      `msgpack:"mode"`
	Option interface{} `msgpack:"option"`
}

type ScheduleJob added in v1.4.0

type ScheduleJob struct {
	Mode          string      `json:"mode" msgpack:"mode"`
	Spec          string      `json:"spec" msgpack:"spec"`
	Option        interface{} `json:"option" msgpack:"option"`
	ScheduleState `json:"schedule_state" msgpack:"state"`
}

type ScheduleOption added in v1.4.0

type ScheduleOption struct {
	Status bool          `json:"status" msgpack:"status" `
	Jobs   []ScheduleJob `json:"jobs" msgpack:"jobs" `
}

type ScheduleState added in v1.4.0

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

type ScheduleStatus added in v1.4.0

type ScheduleStatus struct {
	Key   string `msgpack:"key"`
	Value bool   `msgpack:"value"`
}

type Values

type Values struct {
	Node string `env:"NODE,required"`
	Nats struct {
		Hosts []string `env:"HOSTS,required" envSeparator:","`
		Nkey  string   `env:"NKEY,required"`
	} `envPrefix:"NATS_"`
}

Jump to

Keyboard shortcuts

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