Documentation ¶
Index ¶
- Variables
- func RegisterAdminHandlers(readonlyRouterDB, readonlyBatchRouterDB jobsdb.ReadonlyJobsDB)
- func RoutersManagerSetup()
- type DSStats
- type ErrorCodeCountsByDestination
- type HandleT
- type JSONResponseHandler
- type JobCountByConnections
- type JobCountsByStateAndDestination
- type JobParametersT
- type LatestJobStatusCounts
- type NetHandleI
- type NetHandleT
- type PauseT
- type ResponseHandlerI
- type RouterAdmin
- type RouterRpcHandler
- func (r *RouterRpcHandler) GetDSFailedJobs(arg string, result *string) (err error)
- func (r *RouterRpcHandler) GetDSJobCount(arg string, result *string) (err error)
- func (r *RouterRpcHandler) GetDSList(dsName string, result *string) (err error)
- func (r *RouterRpcHandler) GetDSStats(dsName string, result *string) (err error)
- func (r *RouterRpcHandler) GetJobByID(arg string, result *string) (err error)
- func (r *RouterRpcHandler) GetJobIDStatus(arg string, result *string) (err error)
- type RoutersManagerI
- type RoutersManagerT
- func (rm *RoutersManagerT) AddRouter(router *HandleT)
- func (rm *RoutersManagerT) AreRoutersReady() bool
- func (rm *RoutersManagerT) Pause(destType string)
- func (rm *RoutersManagerT) PauseAll()
- func (rm *RoutersManagerT) Resume(destType string)
- func (rm *RoutersManagerT) ResumeAll()
- func (rm *RoutersManagerT) SetRoutersReady()
- type TXTResponseHandler
Constants ¶
This section is empty.
Variables ¶
var ( Diagnostics diagnostics.DiagnosticsI = diagnostics.Diagnostics QueryFilters jobsdb.QueryFiltersT )
Functions ¶
func RegisterAdminHandlers ¶ added in v0.1.10
func RegisterAdminHandlers(readonlyRouterDB, readonlyBatchRouterDB jobsdb.ReadonlyJobsDB)
func RoutersManagerSetup ¶ added in v1.0.0
func RoutersManagerSetup()
Types ¶
type DSStats ¶ added in v0.1.10
type DSStats struct { JobCountsByStateAndDestination []JobCountsByStateAndDestination ErrorCodeCountsByDestination []ErrorCodeCountsByDestination JobCountByConnections []JobCountByConnections LatestJobStatusCounts []LatestJobStatusCounts UnprocessedJobCounts int }
type ErrorCodeCountsByDestination ¶ added in v0.1.10
type HandleT ¶
type HandleT struct {
// contains filtered or unexported fields
}
HandleT is the handle to this module.
func (*HandleT) Pause ¶ added in v1.0.0
func (rt *HandleT) Pause()
Pause will pause the router To completely pause the router, we should follow the steps in order 1. pause generator 2. drain all the worker channels 3. drain status insert loop queue
func (*HandleT) ResetSleep ¶
func (rt *HandleT) ResetSleep()
ResetSleep this makes the workers reset their sleep
func (*HandleT) Resume ¶ added in v1.0.0
func (rt *HandleT) Resume()
Resume will resume the router Resuming all the router components in the reverse order in which they were paused. 1. resume status insert loop queue 2. resume all the worker channels 3. resume generator
func (*HandleT) Setup ¶
func (rt *HandleT) Setup(backendConfig backendconfig.BackendConfig, jobsDB, errorDB jobsdb.JobsDB, destinationDefinition backendconfig.DestinationDefinitionT, reporting utilTypes.ReportingI)
Setup initializes this module
type JSONResponseHandler ¶ added in v0.1.10
type JSONResponseHandler struct {
// contains filtered or unexported fields
}
JSONResponseHandler handler for json response
func (*JSONResponseHandler) IsSuccessStatus ¶ added in v0.1.10
func (handler *JSONResponseHandler) IsSuccessStatus(respCode int, respBody string) (returnCode int)
IsSuccessStatus - returns the status code based on the response code and body
type JobCountByConnections ¶ added in v0.1.10
type JobCountsByStateAndDestination ¶ added in v0.1.10
type JobParametersT ¶ added in v0.1.10
type JobParametersT struct { SourceID string `json:"source_id"` DestinationID string `json:"destination_id"` ReceivedAt string `json:"received_at"` TransformAt string `json:"transform_at"` SourceBatchID string `json:"source_batch_id"` SourceTaskID string `json:"source_task_id"` SourceTaskRunID string `json:"source_task_run_id"` SourceJobID string `json:"source_job_id"` SourceJobRunID string `json:"source_job_run_id"` }
JobParametersT struct holds source id and destination id of a job
type LatestJobStatusCounts ¶ added in v0.1.10
type NetHandleI ¶ added in v0.1.10
type NetHandleI interface {
SendPost(structData integrations.PostParametersT) (statusCode int, respBody string)
}
Network interface
type NetHandleT ¶
type NetHandleT struct {
// contains filtered or unexported fields
}
NetHandleT is the wrapper holding private variables
func (*NetHandleT) SendPost ¶ added in v0.1.10
func (network *NetHandleT) SendPost(structData integrations.PostParametersT) (statusCode int, respBody string)
SendPost takes the EventPayload of a transformed job, gets the necessary values from the payload and makes a call to destination to push the event to it this returns the statusCode, status and response body from the response of the destination call
type ResponseHandlerI ¶ added in v0.1.10
ResponseHandlerI - handle destination response
func New ¶ added in v0.1.10
func New(responseRules map[string]interface{}) ResponseHandlerI
New returns a destination response handler. Can be nil(Check before using this)
type RouterAdmin ¶ added in v1.0.0
type RouterAdmin struct {
// contains filtered or unexported fields
}
func (*RouterAdmin) Status ¶ added in v1.0.0
func (ra *RouterAdmin) Status() interface{}
Status function is used for debug purposes by the admin interface
type RouterRpcHandler ¶ added in v0.1.10
type RouterRpcHandler struct {
// contains filtered or unexported fields
}
func (*RouterRpcHandler) GetDSFailedJobs ¶ added in v0.1.10
func (r *RouterRpcHandler) GetDSFailedJobs(arg string, result *string) (err error)
func (*RouterRpcHandler) GetDSJobCount ¶ added in v0.1.10
func (r *RouterRpcHandler) GetDSJobCount(arg string, result *string) (err error)
func (*RouterRpcHandler) GetDSList ¶ added in v0.1.10
func (r *RouterRpcHandler) GetDSList(dsName string, result *string) (err error)
func (*RouterRpcHandler) GetDSStats ¶ added in v0.1.10
func (r *RouterRpcHandler) GetDSStats(dsName string, result *string) (err error)
group_by job_status group by custom_val Get all errors = distinct (error), count(*) where state=failed Distinct (src_id, dst_id) Router jobs status flow ⇒ ordered by rank unprocessed_params ⇒ Num jobs not yet picked
func (*RouterRpcHandler) GetJobByID ¶ added in v0.1.10
func (r *RouterRpcHandler) GetJobByID(arg string, result *string) (err error)
func (*RouterRpcHandler) GetJobIDStatus ¶ added in v0.1.10
func (r *RouterRpcHandler) GetJobIDStatus(arg string, result *string) (err error)
type RoutersManagerI ¶ added in v1.0.0
type RoutersManagerI interface { AddRouter(router *HandleT) PauseAll() Pause(destType string) ResumeAll() Resume(destType string) SetRoutersReady() AreRoutersReady() bool }
var (
RoutersManager RoutersManagerI
)
func GetRoutersManager ¶ added in v1.0.0
func GetRoutersManager() (RoutersManagerI, error)
type RoutersManagerT ¶ added in v1.0.0
func (*RoutersManagerT) AddRouter ¶ added in v1.0.0
func (rm *RoutersManagerT) AddRouter(router *HandleT)
func (*RoutersManagerT) AreRoutersReady ¶ added in v1.0.0
func (rm *RoutersManagerT) AreRoutersReady() bool
func (*RoutersManagerT) Pause ¶ added in v1.0.0
func (rm *RoutersManagerT) Pause(destType string)
func (*RoutersManagerT) PauseAll ¶ added in v1.0.0
func (rm *RoutersManagerT) PauseAll()
func (*RoutersManagerT) Resume ¶ added in v1.0.0
func (rm *RoutersManagerT) Resume(destType string)
func (*RoutersManagerT) ResumeAll ¶ added in v1.0.0
func (rm *RoutersManagerT) ResumeAll()
func (*RoutersManagerT) SetRoutersReady ¶ added in v1.0.0
func (rm *RoutersManagerT) SetRoutersReady()
type TXTResponseHandler ¶ added in v0.1.10
type TXTResponseHandler struct {
// contains filtered or unexported fields
}
TXTResponseHandler handler for text response
func (*TXTResponseHandler) IsSuccessStatus ¶ added in v0.1.10
func (handler *TXTResponseHandler) IsSuccessStatus(respCode int, respBody string) (returnCode int)
IsSuccessStatus - returns the status code based on the response code and body