api

package
v0.0.0-...-8b27293 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

View Source
const (
	CONTIMEOUT = 2000  // connection timeout in ms
	KEEPALIVE  = 15000 // keep alive  in ms
)

Variables

This section is empty.

Functions

func AbortMultipartUpload

func AbortMultipartUpload(req datatype.AbortMultipartUploadRequest) error

func ContentToJson

func ContentToJson(contents []byte) string

transform content returned by the bucketd API into JSON string

func CopyObject

func CopyObject(req datatype.CopyObjRequest) (*s3.CopyObjectOutput, error)

func CreateSession

func CreateSession() *session.Session

func CreateSession2

func CreateSession2(req datatype.CreateSession) *session.Session

func DeleteObjectVersions

func DeleteObjectVersions(req []*datatype.DeleteObjRequest) (*s3.DeleteObjectsOutput, error)

func FputObject

func FputObject(req datatype.FputObjRequest) (*s3.PutObjectOutput, error)

func FputObject2

func FputObject2(req datatype.FputObjRequest) (*s3.PutObjectOutput, error)

func GetMultipart

func GetMultipart(req datatype.GetMultipartObjRequest) (int64, error)

func GetObject

func GetObject(req datatype.GetObjRequest) (*s3.GetObjectOutput, error)

func GetRaftBucket

func GetRaftBucket(client *http.Client, url string, bucket string) (error, *datatype.RaftBucket)

func GetRaftBuckets

func GetRaftBuckets(client *http.Client, url string) (error, []string)

func GetRaftBucketsV2

func GetRaftBucketsV2(client *http.Client, url string) (error, []string)

func GetRaftConfig

func GetRaftConfig(what string, url string) (error, bool)

func GetRaftLeader

func GetRaftLeader(client *http.Client, url string) (error, *datatype.RaftLeader)

func GetRaftLeaderV2

func GetRaftLeaderV2(client *http.Client, url string) (error, datatype.RaftLeader)

func GetRaftSession

func GetRaftSession(client *http.Client, url string, sessionId int) (error, *datatype.RaftSessionInfo)

func GetRaftSessionsV2

func GetRaftSessionsV2(client *http.Client, url string) (error, *datatype.RaftSessions)

func GetRaftState

func GetRaftState(client *http.Client, url string) (error, *datatype.RaftState)

func GetRaftStatus

func GetRaftStatus(client *http.Client, url string) (error, string)

func HeathCheck

func HeathCheck(client *http.Client, url string) (error, *datatype.HealthCheck)

func ListCommonPrefix

func ListCommonPrefix(cp []interface{})

func ListObjectLdb

func ListObjectLdb(request datatype.ListObjLdbRequest) (datatype.Rlb, error)

func ListObjectWithContext

func ListObjectWithContext(timeout time.Duration, req datatype.ListObjRequest) (*s3.ListObjectsOutput, error)

func ListObjectWithContextV2

func ListObjectWithContextV2(timeout time.Duration, req datatype.ListObjV2Request) (*s3.ListObjectsV2Output, error)

func ListRaftSessions

func ListRaftSessions(client *http.Client, url string) (error, *datatype.RaftSessions)

func PutObject

func PutObject(req datatype.PutObjRequest) (*s3.PutObjectOutput, error)

func PutObject2

func PutObject2(req datatype.PutObjRequest) (*s3.PutObjectOutput, error)

func PutObjectWithContext

func PutObjectWithContext(timeout time.Duration, req datatype.PutObjRequest3) (*s3.PutObjectOutput, error)

func SetContext

func SetContext(timeout time.Duration) (context.Context, context.CancelFunc)

func StatObject

func StatObject(req datatype.StatObjRequest) (*s3.HeadObjectOutput, error)

func StatObjectV2

func StatObjectV2(request datatype.StatObjRequestV2) (*http.Response, error)

func UploadPart

func UploadPart(req datatype.UploadPartRequest) (*s3.CompletedPart, error)

Types

type Resp

type Resp struct {
	Result *interface{}
	Err    error
	Status int
}

Jump to

Keyboard shortcuts

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