Documentation
¶
Index ¶
Constants ¶
const ( // UnknownState used when the state isn't known, along with err UnknownState PodState = "" // Running represents a running pod Running = "running" // Starting represents pod that is starting Starting = "starting" // Idled represents pod that is idled Idled = "idled" )
const ( // OpenShiftAPIParam is the parameter name under which the OpenShift cluster API URL is passed using // Idle, UnIdle and IsIdle. OpenShiftAPIParam = "openshift_api_url" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a hand-rolled Idler client using plain HTTP requests.
func (*Client) Clusters ¶
Clusters returns a map which maps the OpenShift API URL to the application DNS for this cluster. An empty map together with an error is returned if an error occurs.
type ErrorCode ¶
type ErrorCode uint32
ErrorCode is an integer that clients to can use to compare errors
type JenkinsInfo ¶
type JenkinsInfo struct {
State PodState `json:"state"`
}
JenkinsInfo contains Jenkins pod state
type Mock ¶
type Mock struct { IdlerState PodState // contains filtered or unexported fields }
Mock is a mock implementation of idler service
func (*Mock) Clusters ¶
Clusters returns a map which maps the OpenShift API URL to the application DNS for this cluster. An empty map together with an error is returned if an error occurs.
type PodState ¶
type PodState string
PodState represents status of the pod which could be running|starting|idled|
type ResponseError ¶
ResponseError contains and err description along with http status code
func (ResponseError) Error ¶
func (e ResponseError) Error() string
type Service ¶
type Service interface { UnIdle(tenant string, openShiftAPIURL string) (int, error) State(tenant string, openShiftAPIURL string) (PodState, error) Clusters() (map[string]string, error) }
Service provides methods to talk to the idler client
type StatusResponse ¶
type StatusResponse struct { Data *JenkinsInfo `json:"data,omitempty"` Errors []ResponseError `json:"errors,omitempty"` }
StatusResponse provides jenkins status and errors that occurred while making the status API call to idler