Documentation ¶
Index ¶
- Constants
- func GetClientSet() (clientset kubernetes.Interface, err error)
- type Client
- type ClientType
- type Config
- type CreateScriptOptions
- type DirectScriptsAPI
- func (c DirectScriptsAPI) AbortExecution(scriptID, id string) error
- func (c DirectScriptsAPI) CreateScript(options CreateScriptOptions) (script testkube.Script, err error)
- func (c DirectScriptsAPI) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error)
- func (c DirectScriptsAPI) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error)
- func (c DirectScriptsAPI) GetScript(id string) (script testkube.Script, err error)
- func (c DirectScriptsAPI) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error)
- func (c DirectScriptsAPI) ListScripts(namespace string) (scripts testkube.Scripts, err error)
- type HTTPClient
- type ProxyConfig
- type ProxyScriptsAPI
- func (c ProxyScriptsAPI) AbortExecution(scriptID, id string) error
- func (c ProxyScriptsAPI) CreateScript(options CreateScriptOptions) (script testkube.Script, err error)
- func (c ProxyScriptsAPI) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error)
- func (c ProxyScriptsAPI) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error)
- func (c ProxyScriptsAPI) GetProxy(requestType string) *rest.Request
- func (c ProxyScriptsAPI) GetScript(id string) (script testkube.Script, err error)
- func (c ProxyScriptsAPI) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error)
- func (c ProxyScriptsAPI) ListScripts(namespace string) (scripts testkube.Scripts, err error)
Constants ¶
const (
ClientHTTPTimeout = time.Minute
)
const Version = "v1"
Variables ¶
This section is empty.
Functions ¶
func GetClientSet ¶
func GetClientSet() (clientset kubernetes.Interface, err error)
Types ¶
type Client ¶
type Client interface { GetScript(id string) (script testkube.Script, err error) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error) AbortExecution(script string, id string) error CreateScript(options CreateScriptOptions) (script testkube.Script, err error) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error) ListScripts(namespace string) (scripts testkube.Scripts, err error) }
type ClientType ¶
type ClientType string
const ( ClientDirect ClientType = "direct" ClientProxy ClientType = "proxy" )
type CreateScriptOptions ¶
type CreateScriptOptions testkube.ScriptCreateRequest
CreateScriptOptions - is mapping for now to OpenAPI schema for creating request if needed can beextended to custom struct
type DirectScriptsAPI ¶
type DirectScriptsAPI struct { URI string // contains filtered or unexported fields }
func NewDefaultDirectScriptsAPI ¶
func NewDefaultDirectScriptsAPI() DirectScriptsAPI
func NewDirectScriptsAPI ¶
func NewDirectScriptsAPI(uri string) DirectScriptsAPI
func (DirectScriptsAPI) AbortExecution ¶
func (c DirectScriptsAPI) AbortExecution(scriptID, id string) error
func (DirectScriptsAPI) CreateScript ¶
func (c DirectScriptsAPI) CreateScript(options CreateScriptOptions) (script testkube.Script, err error)
CreateScript creates new Script Custom Resource
func (DirectScriptsAPI) ExecuteScript ¶
func (c DirectScriptsAPI) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error)
ExecuteScript starts new external script execution, reads data and returns ID Execution is started asynchronously client can check later for results
func (DirectScriptsAPI) GetExecution ¶
func (c DirectScriptsAPI) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error)
func (DirectScriptsAPI) GetScript ¶
func (c DirectScriptsAPI) GetScript(id string) (script testkube.Script, err error)
func (DirectScriptsAPI) ListExecutions ¶
func (c DirectScriptsAPI) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error)
ListExecutions list all executions for given script name
func (DirectScriptsAPI) ListScripts ¶
func (c DirectScriptsAPI) ListScripts(namespace string) (scripts testkube.Scripts, err error)
GetExecutions list all executions in given script
type HTTPClient ¶
type ProxyConfig ¶
type ProxyConfig struct { // Namespace where testkube is installed Namespace string // API Server service name ServiceName string // API Server service port ServicePort int }
func NewProxyConfig ¶
func NewProxyConfig(namespace string) ProxyConfig
type ProxyScriptsAPI ¶
type ProxyScriptsAPI struct {
// contains filtered or unexported fields
}
func NewProxyScriptsAPI ¶
func NewProxyScriptsAPI(client kubernetes.Interface, config ProxyConfig) ProxyScriptsAPI
func (ProxyScriptsAPI) AbortExecution ¶
func (c ProxyScriptsAPI) AbortExecution(scriptID, id string) error
GetExecutions list all executions in given script
func (ProxyScriptsAPI) CreateScript ¶
func (c ProxyScriptsAPI) CreateScript(options CreateScriptOptions) (script testkube.Script, err error)
CreateScript creates new Script Custom Resource
func (ProxyScriptsAPI) ExecuteScript ¶
func (c ProxyScriptsAPI) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error)
ExecuteScript starts new external script execution, reads data and returns ID Execution is started asynchronously client can check later for results
func (ProxyScriptsAPI) GetExecution ¶
func (c ProxyScriptsAPI) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error)
func (ProxyScriptsAPI) GetProxy ¶
func (c ProxyScriptsAPI) GetProxy(requestType string) *rest.Request
func (ProxyScriptsAPI) GetScript ¶
func (c ProxyScriptsAPI) GetScript(id string) (script testkube.Script, err error)
func (ProxyScriptsAPI) ListExecutions ¶
func (c ProxyScriptsAPI) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error)
ListExecutions list all executions for given script name
func (ProxyScriptsAPI) ListScripts ¶
func (c ProxyScriptsAPI) ListScripts(namespace string) (scripts testkube.Scripts, err error)
GetExecutions list all executions in given script