Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAPISwarm ¶
this function is in a test package in ipfs, so i copy pasted it here with minor modifications
Types ¶
type TestDriverFactory ¶
type TestDriverFactory struct { Api coreiface.CoreAPI IpnsKey string IpnsReadOnlyKeys []string Ctx context.Context // contains filtered or unexported fields }
I created this test factory so i can better control the create code for example, pass context to the driver, so i can cancel it for the restart test.
func (*TestDriverFactory) Create ¶
func (s *TestDriverFactory) Create(parameters map[string]interface{}) (storagedriver.StorageDriver, error)
type TestRegistry ¶
type TestRegistry struct { Done chan struct{} // contains filtered or unexported fields }
there is no good way of stopping docker registry, So i copied a simplified version of it and added shutdown method.
func NewRegistry ¶
func NewRegistry(ctx context.Context, config *configuration.Configuration) (*TestRegistry, error)
NewRegistry creates a new registry from a context and configuration struct.
func (*TestRegistry) ListenAndServe ¶
func (registry *TestRegistry) ListenAndServe() error
ListenAndServe runs the registry's HTTP server.
func (*TestRegistry) Shutdown ¶
func (registry *TestRegistry) Shutdown() error
Click to show internal directories.
Click to hide internal directories.