utils

package
v0.0.0-...-6b04d54 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpEmptyRespError = "Empty Response from Server"
	NullRepo           = "Repo Not found"
	MissingFlowAttrs   = "Missing Flow attributes"
)
View Source
const (
	LOG_DIRECTORY = "log"
)
View Source
const (
	LOG_PERM os.FileMode = 0755
)

Variables

View Source
var (
	MaxMsgSize = 20 * 1024 * 1024
)

Functions

func ErrHttpEmptyResponse

func ErrHttpEmptyResponse() error

func ErrMissingFlowAttrs

func ErrMissingFlowAttrs() error

func ErrNullRepo

func ErrNullRepo() error

func GetBuffer

func GetBuffer() []byte

func GetOrCreateCondaEnvWithSpec

func GetOrCreateCondaEnvWithSpec(spec string) (string, error)

func GetOrCreateDefaultCondaEnv

func GetOrCreateDefaultCondaEnv(name string) (string, error)

func IsErrHttpEmptyResponse

func IsErrHttpEmptyResponse(err error) bool

func IsErrNullRepo

func IsErrNullRepo(err error) bool

func IsPathEmpty

func IsPathEmpty(path string) bool

func ListFiles

func ListFiles(path string) error

func MkDirAll

func MkDirAll(path string, perm os.FileMode) error

func Open

func Open(path string) (*os.File, error)

func PathExists

func PathExists(path string) bool

func PrintHeader

func PrintHeader(title string)

func PutBuffer

func PutBuffer(buf []byte)

func RandomStr

func RandomStr(size int) string

func WriteFile

func WriteFile(path string, data []byte, perm os.FileMode) error

Types

type LogHandler

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

func NewLogHandler

func NewLogHandler(logpath string, bufflen int) *LogHandler

func (*LogHandler) Close

func (lh *LogHandler) Close()

func (*LogHandler) GetLogPath

func (lh *LogHandler) GetLogPath() string

func (*LogHandler) Listen

func (lh *LogHandler) Listen()

func (*LogHandler) Record

func (lh *LogHandler) Record(m []byte) error

func (*LogHandler) Write

func (lh *LogHandler) Write(m []byte) (_ int, retErr error)

type TaskLogger

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

func (*TaskLogger) Close

func (l *TaskLogger) Close()

func (*TaskLogger) GetLogFile

func (l *TaskLogger) GetLogFile() *os.File

func (*TaskLogger) GetLogPath

func (l *TaskLogger) GetLogPath() string

func (*TaskLogger) Write

func (l *TaskLogger) Write(p []byte) (_ int, retErr error)

type TaskLoggerInterface

type TaskLoggerInterface interface {
	Write(p []byte) (int, error)
	GetLogPath() string
	GetLogFile() *os.File
	Close()
}

func NewTaskLogger

func NewTaskLogger(home string, taskId string) TaskLoggerInterface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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