libs

package
v0.0.0-...-48543aa Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(e error) error

Check Error @e: error

func CheckEnvironment

func CheckEnvironment(path string) (bool, error)

CheckEnvironment function check default env @path : string return bool, error

func CheckFile

func CheckFile(path string) bool

CheckFile function check folder @path : string return error

func ConvertUnixTime

func ConvertUnixTime(unixTime int64) time.Time

ConvertUnixTime ... @unixTime: int64

func CreateFile

func CreateFile(path string) bool

CreateFile function create file @path : string return bool

func DeleteFile

func DeleteFile(path string) bool

DeleteFile Function

func FileRemove

func FileRemove(path string) error

FileRemove Remove Files @path : string return error

func GetAllEnvirontment

func GetAllEnvirontment() map[string]string

GetAllEnvirontment Get value from environtment @key : string

func GetEnvirontment

func GetEnvirontment(key string) string

GetEnvirontment Get value from environtment @key : string

func GetPCurrentPath

func GetPCurrentPath() string

GetPCurrentPath get current path return string

func GetResult

func GetResult(worker, jobsName, uuid string) (map[string]interface{}, error)

GetResult get reslut from jobs

func ListTask

func ListTask(pool *work.WorkerPool)

ListTask list task all

func LoadEnvirontment

func LoadEnvirontment(path string) error

LoadEnvirontment load environment config @path : string

func LogFatal

func LogFatal(word string, report interface{})

LogFatal ...

func LogInfo

func LogInfo(word string, report interface{})

LogInfo ...

func MakeDirs

func MakeDirs(path string) error

MakeDirs fucntion create directory @path : string return error

func ParseJSON

func ParseJSON(data string) (map[string]interface{}, error)

ParseJSON function conver json string to object @data: string return map[string]interface{}, error

func ReadFile

func ReadFile(path string, perm os.FileMode) string

ReadFile function

func ReadHome

func ReadHome() string

ReadHome function return string

func ReadYML

func ReadYML(path string) (scheme.RegisterTask, error)

ReadYML read YML File return map,error

func ReadYMLSend

func ReadYMLSend(path string) (scheme.SendTask, error)

ReadYMLSend read YML File return map,error

func Send

func Send(enqName string, jobName string, dataSchema scheme.SendTask) (scheme.SendResponse, error)

Send function to queue engine @enqName: string @jobName: string

func StartProcess

func StartProcess(processName string, concurency uint) *work.WorkerPool

StartProcess Start Process Server

func WriteFile

func WriteFile(path string, value string, perm os.FileMode) bool

WriteFile func write local file

Types

type ContextTask

type ContextTask struct {
}

ContextTask ...

func (*ContextTask) Log

func (ctx *ContextTask) Log(job *work.Job, next work.NextMiddlewareFunc) error

Log middleware for log job task

func (*ContextTask) TaskRequest

func (ctx *ContextTask) TaskRequest(job *work.Job) error

TaskRequest ...

func (*ContextTask) TaskResponse

func (ctx *ContextTask) TaskResponse(job *work.Job) error

TaskResponse ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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