Documentation
¶
Index ¶
- func AssertWriteStreamAlreadyAborted(t *testing.T, stream io.WriteCloser)
- func ConcatHeaderAndPayload(header []byte, payload []byte) []byte
- func TestAll(t *testing.T, cons Constructor)
- func TestCloseAfterOpen(t *testing.T, cons Constructor)
- func TestCloseTwice(t *testing.T, cons Constructor)
- func TestModeTransition(t *testing.T, cons Constructor, from, to mode.Mode)
- func TestSetMode(t *testing.T, cons Constructor, m mode.Mode)
- type Component
- type Constructor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertWriteStreamAlreadyAborted ¶ added in v0.57.0
func AssertWriteStreamAlreadyAborted(t *testing.T, stream io.WriteCloser)
AssertWriteStreamAlreadyAborted asserts that stream methods fail due to already aborted stream.
func ConcatHeaderAndPayload ¶ added in v0.57.0
ConcatHeaderAndPayload concatenates given object header with payload in Protocol Buffers V3 format.
func TestAll ¶
func TestAll(t *testing.T, cons Constructor)
TestAll checks that storage component doesn't panic under any circumstances during shard operation.
func TestCloseAfterOpen ¶
func TestCloseAfterOpen(t *testing.T, cons Constructor)
TestCloseAfterOpen checks that `Close` can be done right after `Open`. Use-case: open shard, encounter error, close before the initialization.
func TestCloseTwice ¶
func TestCloseTwice(t *testing.T, cons Constructor)
TestCloseTwice checks that `Close` can be done twice.
func TestModeTransition ¶
func TestModeTransition(t *testing.T, cons Constructor, from, to mode.Mode)
func TestSetMode ¶
func TestSetMode(t *testing.T, cons Constructor, m mode.Mode)
TestSetMode checks that any mode transition can be done safely.
Types ¶
type Component ¶
type Component interface {
Open(bool) error
SetMode(mode.Mode) error
Init(blobstor.ID) error
Close() error
}
Component represents single storage component.
type Constructor ¶
Constructor constructs storage component. Each call must create a component using different file-system path.