Documentation ¶
Index ¶
- Constants
- func NewTypedAPIResponse[TBody any](body TBody) func(resp *http.Response, err error) *TypedAPIResponse[TBody]
- type APIClient
- func (api *APIClient) CallAction(job, action string) APIResponse
- func (api *APIClient) JobList() TypedAPIResponse[[]string]
- func (api *APIClient) JobLogs(job string, follow bool, tailLen int) APIResponse
- func (api *APIClient) JobRestart(job string) APIResponse
- func (api *APIClient) JobStart(job string) APIResponse
- func (api *APIClient) JobStatus(job string) TypedAPIResponse[proc.CommonJobStatus]
- func (api *APIClient) JobStop(job string) APIResponse
- type APIResponse
- type CommonAPIResponse
- type StreamingAPIResponse
- type StreamingAPIResponseHandler
- type TypedAPIResponse
Constants ¶
View Source
const ( ApiActionJobStart = "start" ApiActionJobRestart = "restart" ApiActionJobStop = "stop" ApiActionJobStatus = "status" ApiActionJobLogs = "logs" )
Variables ¶
This section is empty.
Functions ¶
func NewTypedAPIResponse ¶ added in v1.9.0
func NewTypedAPIResponse[TBody any](body TBody) func(resp *http.Response, err error) *TypedAPIResponse[TBody]
Types ¶
type APIClient ¶ added in v1.9.0
type APIClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
func (*APIClient) CallAction ¶ added in v1.9.0
func (api *APIClient) CallAction(job, action string) APIResponse
func (*APIClient) JobList ¶ added in v1.9.0
func (api *APIClient) JobList() TypedAPIResponse[[]string]
func (*APIClient) JobLogs ¶ added in v1.9.0
func (api *APIClient) JobLogs(job string, follow bool, tailLen int) APIResponse
func (*APIClient) JobRestart ¶ added in v1.9.0
func (api *APIClient) JobRestart(job string) APIResponse
func (*APIClient) JobStart ¶ added in v1.9.0
func (api *APIClient) JobStart(job string) APIResponse
func (*APIClient) JobStatus ¶ added in v1.9.0
func (api *APIClient) JobStatus(job string) TypedAPIResponse[proc.CommonJobStatus]
func (*APIClient) JobStop ¶ added in v1.9.0
func (api *APIClient) JobStop(job string) APIResponse
type APIResponse ¶ added in v1.9.0
func NewAPIResponse ¶ added in v1.9.0
func NewAPIResponse(resp *http.Response, err error) APIResponse
func NewStreamingAPIResponse ¶ added in v1.9.0
func NewStreamingAPIResponse(url *url.URL, dialer *websocket.Dialer, streamingFunc StreamingAPIResponseHandler) APIResponse
type CommonAPIResponse ¶ added in v1.9.0
type CommonAPIResponse struct { StatusCode int `json:"statusCode"` Body string `json:"body"` Error error `json:"error"` // contains filtered or unexported fields }
func (*CommonAPIResponse) Err ¶ added in v1.9.0
func (resp *CommonAPIResponse) Err() error
func (*CommonAPIResponse) Print ¶ added in v1.9.0
func (resp *CommonAPIResponse) Print() error
type StreamingAPIResponse ¶ added in v1.9.0
type StreamingAPIResponse struct {
// contains filtered or unexported fields
}
func (*StreamingAPIResponse) Err ¶ added in v1.9.0
func (resp *StreamingAPIResponse) Err() error
func (*StreamingAPIResponse) Print ¶ added in v1.9.0
func (resp *StreamingAPIResponse) Print() error
type StreamingAPIResponseHandler ¶ added in v1.9.0
type TypedAPIResponse ¶ added in v1.9.0
type TypedAPIResponse[TBody any] struct { StatusCode int `json:"statusCode"` Body TBody `json:"body"` Error error `json:"error"` // contains filtered or unexported fields }
func (*TypedAPIResponse[TBody]) Err ¶ added in v1.9.0
func (resp *TypedAPIResponse[TBody]) Err() error
func (*TypedAPIResponse[TBody]) Print ¶ added in v1.9.0
func (resp *TypedAPIResponse[TBody]) Print() error
Click to show internal directories.
Click to hide internal directories.