logics

package
v0.0.0-...-7378411 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SPOPINTERVAL time.Duration = time.Second * 30

	GETTASKIDSPOPINTERVAL time.Duration = time.Second * 5
)

Functions

func GetProcInstModel

func GetProcInstModel(appID, setID, moduleID, hostID, procID, funcID, procNum int64, maxInstID uint64) []*metadata.ProcInstanceModel

Types

type Logics

type Logics struct {
	*backbone.Engine
	EsbServ      esbserver.EsbClientInterface
	ProcHostInst *ProcHostInstConfig
	ErrHandle    errors.DefaultCCErrorIf
	// contains filtered or unexported fields
}

func (*Logics) FilterGseTaskIDWaitResultByTaskID

func (lgc *Logics) FilterGseTaskIDWaitResultByTaskID(ctx context.Context, header http.Header, taskID string) ([]string, errors.CCError)

FilterGseTaskIDWaitResultByTaskID Filter out the need to go to gse to get the execution result of the gse task id

func (*Logics) GetAppList

func (lgc *Logics) GetAppList(ctx context.Context, header http.Header, fields string) ([]mapstr.MapStr, error)

func (*Logics) GetHostForGse

func (lgc *Logics) GetHostForGse(ctx context.Context, appID int64, hostIDArr []int64, header http.Header) ([]*metadata.GseHost, error)

func (*Logics) GetModueleIDByAppID

func (lgc *Logics) GetModueleIDByAppID(ctx context.Context, header http.Header, appID int64) ([]int64, error)

func (*Logics) GetModuleIDByHostID

func (lgc *Logics) GetModuleIDByHostID(ctx context.Context, header http.Header, hostID int64) ([]metadata.ModuleHost, error)

func (*Logics) GetProcbyProcIDArr

func (lgc *Logics) GetProcbyProcIDArr(ctx context.Context, procID []int64, header http.Header) ([]mapstr.MapStr, error)

func (*Logics) GetTemplateAttributes

func (lgc *Logics) GetTemplateAttributes(ownerID string, header http.Header) ([]metadata.Header, error)

func (*Logics) GetTemplateInstanceDetails

func (lgc *Logics) GetTemplateInstanceDetails(pheader http.Header, ownerID string, tempID int64) (map[string]interface{}, error)

func (*Logics) HandleHostProcDataChange

func (lgc *Logics) HandleHostProcDataChange(ctx context.Context, eventData *metadata.EventInst)

func (*Logics) HandleProcInstNumByModuleID

func (lgc *Logics) HandleProcInstNumByModuleID(ctx context.Context, header http.Header, appID, moduleID int64) error

func (*Logics) HandleProcInstNumByModuleName

func (lgc *Logics) HandleProcInstNumByModuleName(ctx context.Context, header http.Header, appID int64, moduleName string) ([]int64, error)

func (*Logics) InitFunc

func (lgc *Logics) InitFunc()

InitFunc The method that needs to be executed when the service starts.

func (*Logics) MatchProcessInstance

func (lgc *Logics) MatchProcessInstance(ctx context.Context, params *metadata.MatchProcInstParam, header http.Header) (map[string]*metadata.ProcInstanceModel, error)

func (*Logics) ModifyTaskInfo

func (lgc *Logics) ModifyTaskInfo(ctx context.Context, header http.Header, cond mapstr.MapStr, data mapstr.MapStr) errors.CCError

func (*Logics) NewTemplate

func (lgc *Logics) NewTemplate(pheader http.Header, ownerID string) *TemplateLog

func (*Logics) NewVariables

func (lgc *Logics) NewVariables(pheader http.Header, ownerID string, appID int64) *Variables

func (*Logics) OperateProcInstanceByGse

func (lgc *Logics) OperateProcInstanceByGse(ctx context.Context, procOp *metadata.ProcessOperate, instModels map[string]*metadata.ProcInstanceModel, header http.Header) (string, error)

func (*Logics) QueryProcessOperateResult

func (lgc *Logics) QueryProcessOperateResult(ctx context.Context, taskID string, header http.Header) (succ, waitExec []string, exceErrMap map[string]string, err error)

func (*Logics) RefreshAllHostInstance

func (lgc *Logics) RefreshAllHostInstance(ctx context.Context, header http.Header) error

func (*Logics) RefreshHostInstanceByApp

func (lgc *Logics) RefreshHostInstanceByApp(ctx context.Context, header http.Header, appID int64, appInfo mapstr.MapStr) error

func (*Logics) RegisterProcInstanceToGse

func (lgc *Logics) RegisterProcInstanceToGse(appID, moduleID, procID int64, gseHost []metadata.GseHost, procInfo map[string]interface{}, header http.Header) error

func (*Logics) SetCache

func (lgc *Logics) SetCache(db *redis.Client)

SetCache set the cache object

type ProcHostInstConfig

type ProcHostInstConfig struct {
	MaxEventCount                int
	MaxRefreshModuleCount        int
	GetModuleIDInterval          time.Duration
	FetchGseOPProcResultInterval time.Duration
}

ProcHostInstConfig refresh process host instance number need config

type ScopeMatch

type ScopeMatch struct {
	// contains filtered or unexported fields
}

func NewScopeMatch

func NewScopeMatch(reg string, isString bool) *ScopeMatch

func (*ScopeMatch) MatchInt64

func (s *ScopeMatch) MatchInt64(id int64) bool

func (*ScopeMatch) MatchStr

func (s *ScopeMatch) MatchStr(str string) bool

func (*ScopeMatch) ParseConds

func (s *ScopeMatch) ParseConds() (data interface{}, err error)

ParseConds parse gse kit control conidtion, eg: 11[1-10],11?,*

type TemplateLog

type TemplateLog struct {
	Content *meta.Content
	// contains filtered or unexported fields
}

func (*TemplateLog) AuditLog

func (h *TemplateLog) AuditLog(tempID int64) *auditoplog.AuditLogExt

func (*TemplateLog) WithCurrent

func (h *TemplateLog) WithCurrent(tempID int64) error

func (*TemplateLog) WithPrevious

func (h *TemplateLog) WithPrevious(tempID int64, headers []meta.Header) error

type Variables

type Variables struct {
	// contains filtered or unexported fields
}

func (*Variables) GetAppVariables

func (v *Variables) GetAppVariables() types.MapStr

func (*Variables) GetHostIDByInst

func (v *Variables) GetHostIDByInst(setID, moduleID, funcID, instID int64) int64

func (*Variables) GetHostVariables

func (v *Variables) GetHostVariables(HostID int64) types.MapStr

func (*Variables) GetModuleVariables

func (v *Variables) GetModuleVariables(setID int64, moduleName string) (int64, types.MapStr)

func (*Variables) GetProcessVariables

func (v *Variables) GetProcessVariables(funcID int64) types.MapStr

func (*Variables) GetSetVariables

func (v *Variables) GetSetVariables(setName string) (int64, types.MapStr)

func (*Variables) GetStandVariables

func (v *Variables) GetStandVariables(setName, moduleName string, funcID, instID int64) types.MapStr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL