Documentation ¶
Index ¶
- Constants
- Variables
- func BeautifyJson(byteJson []byte) (string, error)
- func DurationToSecond(duration string) (sec float64)
- func FromJson(byteJson []byte, object interface{}) error
- func GetCarriageReturn() byte
- func GetCurrentTimeAsMilli() int64
- func GetCurrentTimeAsSec() float64
- func GetMd5OfFile(inputFile string) (string, error)
- func GetWhereIs() string
- func GoRoutineWithContext(ctx context.Context, callbacks ...GoRoutineFunc) ([]interface{}, error)
- func GroupLoop(originArray []interface{}, concurrencyCount int, ...) error
- func IF(is bool, trueValue interface{}, falseValue interface{}) interface{}
- func JsonFileToObject(fileName string, object interface{}) error
- func NVL(value interface{}, replace interface{}) interface{}
- func ObjectToFile(fileName string, data interface{}) error
- func QueryString(headers map[string]string) string
- func RemoveFileExtension(inputFile string) string
- func RetryWrapper(callback func() (interface{}, error), retryCount int) (interface{}, error)
- func StringToFile(fileName string, data string) error
- func ToJson(object interface{}) ([]byte, error)
- func ToJsonAsString(object interface{}) string
- func ToJsonBeautifully(object interface{}) string
- func WaitForShutdown(shutdownCallback func())
- type DiskInfo
- type ExternalProgramArguments
- type ExternalProgramExecutor
- func (e *ExternalProgramExecutor) ExecuteAsynchronously() <-chan error
- func (e *ExternalProgramExecutor) ExecuteSynchronously() (string, error)
- func (e *ExternalProgramExecutor) GetExitCode() int
- func (e *ExternalProgramExecutor) GetProcess() *exec.Cmd
- func (e *ExternalProgramExecutor) GetStdErrPipe() io.ReadCloser
- func (e *ExternalProgramExecutor) GetStdInPipe() io.WriteCloser
- func (e *ExternalProgramExecutor) GetStdOutPipe() io.ReadCloser
- func (e *ExternalProgramExecutor) OnMessages(splitFunction func([]byte, bool) (int, []byte, error), ...) <-chan string
- func (e *ExternalProgramExecutor) OnProgress(splitFunction func([]byte, bool) (int, []byte, error), ...) <-chan interface{}
- func (e *ExternalProgramExecutor) OnTimeout() chan error
- type GoRoutineFunc
- type NeptuneError
- func (h *NeptuneError) Action() string
- func (h *NeptuneError) Code() int
- func (h *NeptuneError) Copy(err error) *NeptuneError
- func (h *NeptuneError) Error() string
- func (h *NeptuneError) Message() string
- func (h *NeptuneError) SetAction(action string) *NeptuneError
- func (h *NeptuneError) SetMessage(message string) *NeptuneError
- func (h *NeptuneError) SysErr() error
Constants ¶
View Source
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
View Source
const DefaultHangTimeout = 20 * 60
View Source
const DefaultMaxRetryCount = 5
DefaultMaxRetryCount 최대 재시도 횟수 기본값
View Source
const DefaultProgressUpdateInterval = 30
DefaultProgressUpdateInterval 처리정보 갱신 주기 unit (seconds)
View Source
const (
ErrSigTermCode = 9
)
Variables ¶
View Source
var (
ErrSigTerm = New(ErrSigTermCode, "signal term", "retry")
)
Functions ¶
func BeautifyJson ¶
func DurationToSecond ¶
func GetCarriageReturn ¶
func GetCarriageReturn() byte
func GetCurrentTimeAsMilli ¶ added in v0.0.4
func GetCurrentTimeAsMilli() int64
func GetCurrentTimeAsSec ¶ added in v0.0.4
func GetCurrentTimeAsSec() float64
func GetMd5OfFile ¶
func GetWhereIs ¶
func GetWhereIs() string
func GoRoutineWithContext ¶
func GoRoutineWithContext(ctx context.Context, callbacks ...GoRoutineFunc) ([]interface{}, error)
func JsonFileToObject ¶
func ObjectToFile ¶
func QueryString ¶
func RemoveFileExtension ¶
func RetryWrapper ¶
func StringToFile ¶
func ToJsonAsString ¶
func ToJsonAsString(object interface{}) string
func ToJsonBeautifully ¶
func ToJsonBeautifully(object interface{}) string
func WaitForShutdown ¶
func WaitForShutdown(shutdownCallback func())
Types ¶
type ExternalProgramExecutor ¶
type ExternalProgramExecutor struct { HangTimeout int64 // contains filtered or unexported fields }
func NewExternalProgramExecutor ¶
func NewExternalProgramExecutor(execName string, inputArgs []string, outputArgs []string) *ExternalProgramExecutor
func (*ExternalProgramExecutor) ExecuteAsynchronously ¶
func (e *ExternalProgramExecutor) ExecuteAsynchronously() <-chan error
func (*ExternalProgramExecutor) ExecuteSynchronously ¶
func (e *ExternalProgramExecutor) ExecuteSynchronously() (string, error)
func (*ExternalProgramExecutor) GetExitCode ¶
func (e *ExternalProgramExecutor) GetExitCode() int
func (*ExternalProgramExecutor) GetProcess ¶
func (e *ExternalProgramExecutor) GetProcess() *exec.Cmd
func (*ExternalProgramExecutor) GetStdErrPipe ¶
func (e *ExternalProgramExecutor) GetStdErrPipe() io.ReadCloser
func (*ExternalProgramExecutor) GetStdInPipe ¶
func (e *ExternalProgramExecutor) GetStdInPipe() io.WriteCloser
func (*ExternalProgramExecutor) GetStdOutPipe ¶
func (e *ExternalProgramExecutor) GetStdOutPipe() io.ReadCloser
func (*ExternalProgramExecutor) OnMessages ¶
func (*ExternalProgramExecutor) OnProgress ¶
func (e *ExternalProgramExecutor) OnProgress(splitFunction func([]byte, bool) (int, []byte, error), scanFunction func(*bufio.Scanner, chan interface{}, interface{}), pipe io.ReadCloser, args interface{}) <-chan interface{}
func (*ExternalProgramExecutor) OnTimeout ¶
func (e *ExternalProgramExecutor) OnTimeout() chan error
type GoRoutineFunc ¶
type NeptuneError ¶
type NeptuneError struct {
// contains filtered or unexported fields
}
func (*NeptuneError) Action ¶
func (h *NeptuneError) Action() string
func (*NeptuneError) Code ¶
func (h *NeptuneError) Code() int
func (*NeptuneError) Copy ¶
func (h *NeptuneError) Copy(err error) *NeptuneError
func (*NeptuneError) Error ¶
func (h *NeptuneError) Error() string
func (*NeptuneError) Message ¶
func (h *NeptuneError) Message() string
func (*NeptuneError) SetAction ¶
func (h *NeptuneError) SetAction(action string) *NeptuneError
func (*NeptuneError) SetMessage ¶
func (h *NeptuneError) SetMessage(message string) *NeptuneError
func (*NeptuneError) SysErr ¶
func (h *NeptuneError) SysErr() error
Click to show internal directories.
Click to hide internal directories.