xuperdb

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFileRetentionTime = time.Hour * 72

Maximum default time for saving predict file results

Variables

This section is empty.

Functions

This section is empty.

Types

type XuperDB

type XuperDB struct {
	PrivateKey ecdsa.PrivateKey // the private key is the dataOwner node client private key generated by the executor
	Address    string           // the dataOwner node host
	Ns         string           // it defines which namespace in XuperDB prediction file will be stored
	ExpireTime int64            // the expiration time of the files stored in XuperDB
}

XuperDB defines xuperdb client Only the prediction files supports storing to xuperdb

func New

func New(expireTime int64, ns, host string, privateKey ecdsa.PrivateKey) *XuperDB

New initiates xuperDB Storage

func (*XuperDB) Read

func (x *XuperDB) Read(fileID string) (io.ReadCloser, error)

Read gets files from xuperDB

func (*XuperDB) Write

func (x *XuperDB) Write(r io.Reader, name string) (string, error)

Write stores files in xuperDB, name is prediction task's ID return the id of the file stored in xuperdb

Jump to

Keyboard shortcuts

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