Documentation ¶
Index ¶
- Constants
- func InitOpenAPIClient(cli *Client)
- type BaseRequest
- type Client
- func (c *Client) CreateHTTPJob(req *CreateHTTPJobRequest) (int64, error)
- func (c *Client) CreateJob(req *CreateJavaJobRequest) (int64, error)
- func (c *Client) DeleteJob(req *DeleteJobRequest) error
- func (c *Client) DisableJob(req *DisableJobRequest) error
- func (c *Client) Domain() string
- func (c *Client) EnableJob(req *EnableJobRequest) error
- func (c *Client) ExecJob(req *DeleteJobRequest) error
- func (c *Client) GetJobInstance(req *GetJobInstanceRequest) error
- func (c *Client) GetJobInstanceList(req *GetJobInstanceListRequest) error
- func (c *Client) HttpClient() *http.Client
- func (c *Client) KillJobInstance(req *KillJobInstanceRequest) error
- func (c *Client) Namespace() string
- func (c *Client) NamespaceSource() string
- func (c *Client) SetDomain()
- func (c *Client) UpdateJob(req *UpdateJobRequest) (int64, error)
- type ContactInfo
- type CreateHTTPJobRequest
- type CreateHTTPJobResponse
- type CreateJavaJobRequest
- type CreateJavaJobResponse
- type DeleteJobRequest
- type DisableJobRequest
- type EnableJobRequest
- type ExecJobRequest
- type GetJobInstanceListRequest
- type GetJobInstanceRequest
- type HttpAttribute
- type HttpJobConfig
- type JSONResult
- type JavaJobConfig
- type JobBaseConfig
- type JobConfigInfo
- type JobMonitorInfo
- type KillJobInstanceRequest
- type MapTaskXAttrs
- type MonitorConfig
- type Option
- func WithApp(app string) Option
- func WithAppKey(appKey string) Option
- func WithGroupId(groupId string) Option
- func WithHTTPClient(httpClient http.Client) Option
- func WithInitMethod(initMethod string) Option
- func WithNamespace(namespace string) Option
- func WithOpenAPIDomain(domain string) Option
- func WithOpenAPIEndpoint(endpoint string) Option
- func WithUser(user string) Option
- type TimeConfig
- type UpdateJobRequest
- type UpdateJobResponse
Constants ¶
View Source
const ( // HTTP method HTTPGetMethod = "GET" // job default conf DefaultXattrsPageSize = 5 DefaultXattrsConsumerSize = 5 DefaultXattrsQueueSize = 10 DefaultXattrsDispatcherSize = 5 DefaultXattrsGlobalConsumerSize = 1000 // time expression type CronType = 1 // cron FixRateType = 3 // fixed frequency SecondDelayType = 4 // second level delay OneTimeType = 5 // one-time tasks APIType = 100 // api type // execute mode ExecModeStandalone = "standalone" ExecModeBroadcast = "broadcast" ExecModeParallel = "parallel" ExecModeGrid = "grid" ExecModeBatch = "batch" // openAPI special header TIME_STAMP_HEADER = "openapi-timestamp" SIGNATURE_HEADER = "openapi-signature" GROUPID_HEADER = "openapi-groupid" NAMESPACE_KEY_HEADER = "schedulerx-namespace" NAMESPACE_SOURCE_HEADER = "schedulerx-namespace-source" CREATE_NAMESPACE_HEADER = "openapi-create-namespace" CREATE_GROUP_HEADER = "openapi-create-group" LIST_NAMESPACES_HEADER = "openapi-list-namespaces" LIST_GROUPS_HEADER = "openapi-list-groups" ADMIN_USERS = "app.admin.users" ENV = "app.env" ENV_NETWORK = "app.env.network" )
Variables ¶
This section is empty.
Functions ¶
func InitOpenAPIClient ¶
func InitOpenAPIClient(cli *Client)
Types ¶
type BaseRequest ¶
type BaseRequest interface {
// contains filtered or unexported methods
}
func NewDefaultBaseRequest ¶
func NewDefaultBaseRequest() BaseRequest
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func GetOpenAPIClient ¶
func GetOpenAPIClient() *Client
GetOpenAPIClient first executes InitOpenAPIClient and then calls it, otherwise it returns nil
func (*Client) CreateHTTPJob ¶
func (c *Client) CreateHTTPJob(req *CreateHTTPJobRequest) (int64, error)
CreateHTTPJob create http job
func (*Client) CreateJob ¶
func (c *Client) CreateJob(req *CreateJavaJobRequest) (int64, error)
CreateJob create java type job
func (*Client) DeleteJob ¶
func (c *Client) DeleteJob(req *DeleteJobRequest) error
DeleteJob delete job
func (*Client) DisableJob ¶
func (c *Client) DisableJob(req *DisableJobRequest) error
func (*Client) EnableJob ¶
func (c *Client) EnableJob(req *EnableJobRequest) error
func (*Client) ExecJob ¶
func (c *Client) ExecJob(req *DeleteJobRequest) error
func (*Client) GetJobInstance ¶
func (c *Client) GetJobInstance(req *GetJobInstanceRequest) error
func (*Client) GetJobInstanceList ¶
func (c *Client) GetJobInstanceList(req *GetJobInstanceListRequest) error
func (*Client) HttpClient ¶
func (*Client) KillJobInstance ¶
func (c *Client) KillJobInstance(req *KillJobInstanceRequest) error
func (*Client) NamespaceSource ¶
type ContactInfo ¶
type ContactInfo struct {
// contains filtered or unexported fields
}
ContactInfo monitoring alarm contacts
type CreateHTTPJobRequest ¶
type CreateHTTPJobRequest struct { BaseRequest HttpJobConfig }
type CreateHTTPJobResponse ¶
type CreateHTTPJobResponse struct {
JobId int64 `json:"job_id"`
}
type CreateJavaJobRequest ¶
type CreateJavaJobRequest struct { BaseRequest JavaJobConfig }
type CreateJavaJobResponse ¶
type CreateJavaJobResponse struct {
JobId int64 `json:"job_id"`
}
type DeleteJobRequest ¶
type DeleteJobRequest struct { BaseRequest // contains filtered or unexported fields }
type DisableJobRequest ¶
type DisableJobRequest struct { BaseRequest // contains filtered or unexported fields }
type EnableJobRequest ¶
type EnableJobRequest struct { BaseRequest // contains filtered or unexported fields }
type ExecJobRequest ¶
type ExecJobRequest struct { BaseRequest // contains filtered or unexported fields }
type GetJobInstanceListRequest ¶
type GetJobInstanceListRequest struct { BaseRequest // contains filtered or unexported fields }
type GetJobInstanceRequest ¶
type GetJobInstanceRequest struct { BaseRequest // contains filtered or unexported fields }
type HttpAttribute ¶
type HttpAttribute struct {
// contains filtered or unexported fields
}
func NewDefaultHttpAttribute ¶
func NewDefaultHttpAttribute() HttpAttribute
func (*HttpAttribute) IsRequired ¶
func (attr *HttpAttribute) IsRequired() bool
type HttpJobConfig ¶
type HttpJobConfig struct { JobBaseConfig // contains filtered or unexported fields }
func NewDefaultHTTPJobConfig ¶
func NewDefaultHTTPJobConfig(className string) HttpJobConfig
func (*HttpJobConfig) IsRequired ¶
func (c *HttpJobConfig) IsRequired() bool
type JSONResult ¶ added in v0.0.2
type JavaJobConfig ¶
type JavaJobConfig struct { JobBaseConfig // contains filtered or unexported fields }
JavaJobConfig java task basic configuration
func NewDefaultJavaJobConfig ¶
func NewDefaultJavaJobConfig(className string) JavaJobConfig
func (JavaJobConfig) IsRequired ¶
func (c JavaJobConfig) IsRequired() bool
type JobBaseConfig ¶
type JobBaseConfig struct {
// contains filtered or unexported fields
}
JobBaseConfig task public information
func NewDefaultJobBaseConfig ¶
func NewDefaultJobBaseConfig() JobBaseConfig
func (JobBaseConfig) IsRequired ¶
func (c JobBaseConfig) IsRequired() bool
type JobConfigInfo ¶
type JobConfigInfo struct { JobBaseConfig // contains filtered or unexported fields }
JobConfigInfo task configuration information
type JobMonitorInfo ¶
type JobMonitorInfo struct {
// contains filtered or unexported fields
}
JobMonitorInfo task alarm information configuration
func NewDefaultJobMonitorInfo ¶
func NewDefaultJobMonitorInfo() JobMonitorInfo
func (JobMonitorInfo) IsRequired ¶
func (c JobMonitorInfo) IsRequired() bool
type KillJobInstanceRequest ¶
type KillJobInstanceRequest struct { BaseRequest // contains filtered or unexported fields }
type MapTaskXAttrs ¶
type MapTaskXAttrs struct {
// contains filtered or unexported fields
}
func NewDefaultMapTaskXAttrs ¶
func NewDefaultMapTaskXAttrs() MapTaskXAttrs
type MonitorConfig ¶
type MonitorConfig struct {
// contains filtered or unexported fields
}
MonitorConfig monitor configuration json content
func NewDefaultMonitorConfig ¶
func NewDefaultMonitorConfig() MonitorConfig
type Option ¶
type Option func(*Client)
func WithAppKey ¶
func WithGroupId ¶
func WithHTTPClient ¶
func WithInitMethod ¶
func WithNamespace ¶
func WithOpenAPIDomain ¶
func WithOpenAPIEndpoint ¶
type TimeConfig ¶
type TimeConfig struct {
// contains filtered or unexported fields
}
TimeConfig time expression
func NewDefaultTimeConfig ¶
func NewDefaultTimeConfig() TimeConfig
func (TimeConfig) IsRequired ¶
func (c TimeConfig) IsRequired() bool
type UpdateJobRequest ¶
type UpdateJobRequest struct { BaseRequest // Task information to be modified JobConfigInfo }
type UpdateJobResponse ¶
type UpdateJobResponse struct {
JobId int64 `json:"job_id"`
}
Click to show internal directories.
Click to hide internal directories.