clients

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyJob     = "/hera/dm/job"
	KeyStopJob = "/hera/dm/stop-job/"
	KeyStatus  = "/hera/dm/status/"

	RtuKeyStatus = "/hera/rtu/status/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DmClient

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

func NewDmClient

func NewDmClient(cli *clientv3.Client) *DmClient

func (*DmClient) All

func (d *DmClient) All() ([]*config.Status, error)

func (*DmClient) Delete

func (d *DmClient) Delete(jobId string) (int64, error)

func (*DmClient) DeleteAll

func (d *DmClient) DeleteAll() (int64, error)

func (*DmClient) StartJob

func (d *DmClient) StartJob(job config.Job) error

StartJob 启动一个任务

func (*DmClient) StartJobs

func (d *DmClient) StartJobs(job []config.Job) error

StartJob 启动一个任务

func (*DmClient) Status

func (d *DmClient) Status(jobId string) (*config.Status, error)

func (*DmClient) StopJob

func (d *DmClient) StopJob(jobId string) error

type RtuClient

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

func NewRtuClient

func NewRtuClient(client *clientv3.Client) *RtuClient

func (*RtuClient) All

func (r *RtuClient) All() ([]*config.Status, error)

func (*RtuClient) Delete

func (r *RtuClient) Delete(jobId string) (int64, error)

func (*RtuClient) JobKey

func (r *RtuClient) JobKey() string

func (*RtuClient) StartJob

func (r *RtuClient) StartJob(job config.Job) error

func (*RtuClient) StartJobs

func (r *RtuClient) StartJobs(job []config.Job) error

func (*RtuClient) Status

func (r *RtuClient) Status(jobId string) (*config.Status, error)

func (*RtuClient) StatusKey

func (r *RtuClient) StatusKey(jobID string) string

func (*RtuClient) StopJob

func (r *RtuClient) StopJob(jobId string) error

func (*RtuClient) StopJobKey

func (r *RtuClient) StopJobKey(jobID string) string

Jump to

Keyboard shortcuts

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