Documentation ¶
Index ¶
- Constants
- Variables
- func ContentTrim(contentType, content string) string
- func DecodeBase64(s string) ([]byte, error)
- func DecodeBase64String(s string) (string, error)
- func EncodeBase64(s []byte) string
- func EncodeStringBase64(s string) string
- func ExtendMemoryBlock(blk []byte, expectedSize int64) []byte
- func GenerateNewID() int64
- func HandleTerminalSignal() chan struct{}
- func Mkdir(path string) error
- func MustRandString(length int) string
- func NewApiContext(r *http.Request) context.Context
- func NewMemoryBlock(blkSize int64) []byte
- func NewReader(reader io.ReaderAt) io.Reader
- func NewReaderWithContextReaderAt(ctx context.Context, reader ContextReaderAt) io.Reader
- func NewReaderWithOffset(reader io.ReaderAt, off int64) io.Reader
- func NewWorkflowJobContext(ctx context.Context, jobID string) context.Context
- func NewWriter(writer io.WriterAt) io.Writer
- func NewWriterWithContextWriter(ctx context.Context, writer ContextWriterAt) io.Writer
- func NewWriterWithOffset(writer io.WriterAt, off int64) io.Writer
- func RandString(length int) (string, error)
- func RandStringRunes(n int) string
- func Recover() error
- func ReleaseMemoryBlock(blk []byte)
- func Rmdir(path string) error
- func Shutdown()
- func WorkflowJobLogger(ctx context.Context, log *zap.SugaredLogger) *zap.SugaredLogger
- type ContextReaderAt
- type ContextWriterAt
- type LFUPool
- type ParallelLimiter
- type ParallelWorker
- type StringSet
Constants ¶
View Source
const (
PathSeparator = string(os.PathSeparator)
)
Variables ¶
View Source
var ZeroDevice = zeroDevice{}
Functions ¶
func ContentTrim ¶
func DecodeBase64 ¶
func DecodeBase64String ¶
func EncodeBase64 ¶
func EncodeStringBase64 ¶
func ExtendMemoryBlock ¶
func GenerateNewID ¶
func GenerateNewID() int64
func HandleTerminalSignal ¶
func HandleTerminalSignal() chan struct{}
func MustRandString ¶
func NewMemoryBlock ¶
func NewReaderWithContextReaderAt ¶
func NewReaderWithContextReaderAt(ctx context.Context, reader ContextReaderAt) io.Reader
func NewWorkflowJobContext ¶
func NewWriterWithContextWriter ¶
func NewWriterWithContextWriter(ctx context.Context, writer ContextWriterAt) io.Writer
func RandString ¶
func RandStringRunes ¶
func ReleaseMemoryBlock ¶
func ReleaseMemoryBlock(blk []byte)
func WorkflowJobLogger ¶
func WorkflowJobLogger(ctx context.Context, log *zap.SugaredLogger) *zap.SugaredLogger
Types ¶
type ContextReaderAt ¶
type ContextWriterAt ¶
type LFUPool ¶
type LFUPool struct { HandlerRemove func(k string, v interface{}) // contains filtered or unexported fields }
func NewLFUPool ¶
type ParallelLimiter ¶
type ParallelLimiter struct {
// contains filtered or unexported fields
}
func NewParallelLimiter ¶
func NewParallelLimiter(ctn int) *ParallelLimiter
func (*ParallelLimiter) Release ¶
func (l *ParallelLimiter) Release()
type ParallelWorker ¶
type ParallelWorker struct {
// contains filtered or unexported fields
}
func NewParallelWorker ¶
func NewParallelWorker(num int32) *ParallelWorker
func (*ParallelWorker) Dispatch ¶
func (p *ParallelWorker) Dispatch(ctx context.Context, fn func())
Source Files ¶
Click to show internal directories.
Click to hide internal directories.