Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToUint16(b []byte) (v uint16)
- func BytesToUint32(b []byte) (v uint32)
- func BytesToUint64(b []byte) (v uint64)
- func Delete(url string, jwt security.EncodedJwt) error
- func Do(req *http.Request) (resp *http.Response, err error)
- func DownloadUrl(fileUrl string) (filename string, rc io.ReadCloser, e error)
- func Get(url string) ([]byte, error)
- func GetBufferStream(url string, values url.Values, allocatedBytes []byte, eachBuffer func([]byte)) error
- func GetUrlStream(url string, values url.Values, readFn func(io.Reader) error) error
- func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func Head(url string) (http.Header, error)
- func IsGzippableFileType(ext, mtype string) (shouldBeZipped, iAmSure bool)
- func ListManage(server string) (leader string, peers []string, err error)
- func NewListener(addr string, timeout time.Duration) (net.Listener, error)
- func NormalizeUrl(url string) string
- func Post(url string, values url.Values) ([]byte, error)
- func PostBytes(url string, body []byte) ([]byte, error)
- func TestFolderWritable(folder string) (err error)
- func Uint16toBytes(b []byte, v uint16)
- func Uint32toBytes(b []byte, v uint32)
- func Uint64toBytes(b []byte, v uint64)
- func Uint8toBytes(b []byte, v uint8)
- func UnGzipData(input []byte) ([]byte, error)
- func WriteJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err error)
- func WriteJsonQuiet(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{})
- type BytesPool
- type ClusterStatusResult
- type Conn
- type Listener
- type VIDType
Constants ¶
View Source
const (
VERSION = "0.1"
)
Variables ¶
View Source
var (
ChunkSizes = []int{
1 << 4,
1 << 6,
1 << 8,
1 << 10,
1 << 12,
1 << 14,
1 << 16,
1 << 18,
1 << 20,
1 << 22,
1 << 24,
1 << 26,
1 << 28,
}
)
View Source
var (
Transport *http.Transport
)
Functions ¶
func BytesToUint16 ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func DownloadUrl ¶
func DownloadUrl(fileUrl string) (filename string, rc io.ReadCloser, e error)
func GetBufferStream ¶
func GetUrlStream ¶
func GrpcDial ¶
func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func IsGzippableFileType ¶
* Default more not to gzip since gzip can be done on client side.
func NormalizeUrl ¶
func TestFolderWritable ¶
func Uint16toBytes ¶
func Uint32toBytes ¶
func Uint64toBytes ¶
func Uint8toBytes ¶
func UnGzipData ¶
func WriteJsonError ¶
func WriteJsonQuiet ¶
func WriteJsonQuiet(w http.ResponseWriter, r *http.Request, httpStatus int, obj interface{})
Types ¶
type BytesPool ¶
type BytesPool struct {
// contains filtered or unexported fields
}
func NewBytesPool ¶
func NewBytesPool() *BytesPool
type ClusterStatusResult ¶
Click to show internal directories.
Click to hide internal directories.