client

package
v0.0.0-...-9252583 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL        ClientType = "local"
	LOCAL_ASYNC             = "local_async"
	LOCAL_BATCH             = "local_batch"
	RUNNER                  = "runner"
	RUNNER_ASYNC            = "runner_async"
	SSH                     = "ssh"
	WHEEL                   = "wheel"
	WHEEL_ASYNC             = "wheel_async"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientType

type ClientType string

type RunResult

type RunResult struct {
	Return []interface{} `json:"return"`
}

type SaltClient

type SaltClient struct {
	BaseUrl    string
	Username   string
	Password   string
	Eauth      string
	HttpClient *http.Client
}

func NewClient

func NewClient(url, username, password, eauth string) SaltClient

func (*SaltClient) Call

func (c *SaltClient) Call(call calls.Call, clientType ClientType, tgt *target.SaltTarget) (data []byte, err error)

func (*SaltClient) Run

func (c *SaltClient) Run(clilentType ClientType, fun string, tgt target.SaltTarget,
	args []interface{}, kwargs map[string]interface{}) (data *RunResult, err error)

Run: more info at:https://docs.saltproject.io/en/latest/ref/netapi/all/salt.netapi.rest_cherrypy.html#run

Jump to

Keyboard shortcuts

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