utils

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountToHuman

func ByteCountToHuman(b int64) string

func ByteSliceToString added in v0.5.0

func ByteSliceToString(bs []byte) string

func EstimateCuckooFilter added in v0.5.0

func EstimateCuckooFilter(elementCount int64) uint

func UnsafeGetBytes added in v0.5.0

func UnsafeGetBytes(s string) []byte

Types

type StreamHijacker added in v0.5.0

type StreamHijacker struct {
	Buffer   []byte
	Offset   int
	Upstream io.ReadCloser

	Size    int
	OnClose func(*StreamHijacker)
	// contains filtered or unexported fields
}

func NewStreamHijacker added in v0.5.0

func NewStreamHijacker(size int, fileType string, upstream io.ReadCloser) *StreamHijacker

func (*StreamHijacker) Close added in v0.5.0

func (s *StreamHijacker) Close() error

func (*StreamHijacker) FileType added in v0.5.0

func (s *StreamHijacker) FileType() string

func (*StreamHijacker) Read added in v0.5.0

func (s *StreamHijacker) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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