client

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ApplicationInfos []ApplicationInfo `json:"app"`
}

type ApplicationInfo

type ApplicationInfo struct {
	Id              string  `json:"id,omitempty"`
	User            string  `json:"user,omitempty"`
	Name            string  `json:"name,omitempty"`
	Queue           string  `json:"queue,omitempty"`
	State           string  `json:"state,omitempty"`
	FinalStatus     string  `json:"finalStatus,omitempty"`
	Progess         float64 `json:"progress,omitempty"`
	TrackingUI      string  `json:"trackingUI,omitempty"`
	TrackingUrl     string  `json:"trackingUrl,omitempty"`
	ApplicationType string  `json:"applicationType,omitempty"`
	ApplicationTags string  `json:"applicationTags,omitempty"`
	StartedTime     int64   `json:"startedTime,omitempty"`
	FinishedTime    int64   `json:"finishedTime,omitempty"`
	Diagnostics     string  `json:"diagnostics,omitempty"`
}

func (*ApplicationInfo) FinishedDateTime

func (a *ApplicationInfo) FinishedDateTime() time.Time

FinishedDateTime return FinishedTime as time.Time

func (*ApplicationInfo) StartedDateTime

func (a *ApplicationInfo) StartedDateTime() time.Time

StartedDateTime return StartedTime as time.Time

func (*ApplicationInfo) String

func (a *ApplicationInfo) String() string

String permit to return Application as Json string

func (*ApplicationInfo) Tags

func (a *ApplicationInfo) Tags() map[string]string

Split string tag as map

type Applications

type Applications struct {
	Applications *Application `json:"apps"`
}

func (*Applications) String

func (a *Applications) String() string

String permit to return Applications as Json string

type YarnClient

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

Yarn client object

func New

func New(baseUrl string, login string, password string) *YarnClient

New permit to create new Yarn client It return AmbariClient

func (*YarnClient) Applications

func (c *YarnClient) Applications(filters map[string]string) ([]ApplicationInfo, error)

Applications permit to get all application that match the given filters It return the list of Application if found It return empty list if not found It return error if something wrong when API call

func (*YarnClient) Client

func (c *YarnClient) Client() *resty.Client

Client permit to return resty.Client Object

func (*YarnClient) DisableVerifySSL

func (c *YarnClient) DisableVerifySSL()

DisableVerifySSL permit to disable the SSL certificat check when call Ambari webservice

func (*YarnClient) SetClient

func (c *YarnClient) SetClient(client *resty.Client)

Pertmit to set custom resty.Client for advance option

type YarnError

type YarnError struct {
	Code    int
	Message string
}

func NewYarnError

func NewYarnError(code int, message string, params ...interface{}) YarnError

func (YarnError) Error

func (e YarnError) Error() string

Jump to

Keyboard shortcuts

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