probe

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

Environment encapsulates a temporary SAIO-style environment for the object server, replicator, and auditor and provides a few utility functions for manipulating it.

func NewEnvironment

func NewEnvironment(settings ...string) *Environment

NewEnvironment creates a new environment. Arguments should be a series of key, value pairs that are added to the object server configuration file.

func (*Environment) Close

func (e *Environment) Close()

Close frees any resources associated with the Environment.

func (*Environment) DeleteObject

func (e *Environment) DeleteObject(server int, timestamp string, policy int) bool

DeleteObject deletes the object.

func (*Environment) FileLocations

func (e *Environment) FileLocations(account, container, obj string, policy int) (paths []string)

FileLocations returns a list of file paths for the object's hash directory on all three underlying object servers.

func (*Environment) ObjExists

func (e *Environment) ObjExists(server int, timestamp string, policy int) bool

ObjExists returns a boolean indicating that it can fetch the named object and that its X-Timestamp matches the timestamp argument.

func (*Environment) PutObject

func (e *Environment) PutObject(server int, timestamp string, data string, policy int) bool

PutObject uploads an object "/a/c/o" to the indicated server with X-Timestamp set to timestamp and body set to data.

type TestReplicatorWebServer

type TestReplicatorWebServer struct {
	*httptest.Server
	// contains filtered or unexported fields
}

func (*TestReplicatorWebServer) Close

func (t *TestReplicatorWebServer) Close()

Jump to

Keyboard shortcuts

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