Documentation
¶
Overview ¶
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Apache Software Foundation (ASF) licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AllocateFreePorts(n int) ([]int, error)
- func NewEntityEventMatcher(action databasev1.Action) gomock.Matcher
- func NewEtcdListenUrls() (string, string, error)
- func NewShardEventMatcher(action databasev1.Action) gomock.Matcher
- func NewSpace() (tempDir string, deferFunc func(), err error)
- func Retry(attempts int, sleep time.Duration, f func() error) (err error)
- func SetUpModules(flags []string, units ...run.Unit) func()
- func Space(t *require.Assertions) (tempDir string, deferFunc func())
- type Flow
- type StartFunc
- type StopFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateFreePorts ¶
AllocateFreePorts finds n available ports Copied from https://github.com/tendermint/tendermint/issues/3682
func NewEntityEventMatcher ¶
func NewEntityEventMatcher(action databasev1.Action) gomock.Matcher
func NewEtcdListenUrls ¶
func NewShardEventMatcher ¶
func NewShardEventMatcher(action databasev1.Action) gomock.Matcher
func SetUpModules ¶
func Space ¶
func Space(t *require.Assertions) (tempDir string, deferFunc func())
Types ¶
type Flow ¶
type Flow interface {
// PushErrorHandler only pushes a stopFunc
PushErrorHandler(StopFunc) Flow
// Run calls the startFunc and expects no error returned.
// If a non-nil error is returned or panic, shutdown must be called at once.
// The error will be stored and thus could be checked by the caller later.
Run(context.Context, StartFunc, StopFunc) Flow
// RunWithoutSideEffect calls the startFunc and does not expect any side effects from it.
// If a non-nil error is returned or panic, shutdown must be called at once.
// The error will be stored and thus could be checked by the caller later.
RunWithoutSideEffect(context.Context, StartFunc) Flow
// Shutdown does not actually shutdown the flow,
// but only returns a function containing all stopFunc(s) to be executed.
// The timing to do the real shutdown can be determined by users.
Shutdown() StopFunc
// Error returns all errors returned from startFunc(s)
// Nil error imply a successful flow.
Error() error
}
func NewTestFlow ¶
func NewTestFlow() Flow
NewTestFlow creates a flow ready to prepare services/components to be used for testing.
Directories
¶
| Path | Synopsis |
|---|---|
|
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements.
|
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. |
|
traffic
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements.
|
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. |
|
traffic
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements.
|
Licensed to Apache Software Foundation (ASF) under one or more contributor license agreements. |