Documentation ¶
Index ¶
- Constants
- func NewTestServer(require *require.Assertions, revisionQuantization time.Duration, ...) (*grpc.ClientConn, func(), datastore.Datastore, decimal.Decimal)
- func TestClusterWithDispatch(t testing.TB, size uint, ds datastore.Datastore) ([]*grpc.ClientConn, func())
- func TestClusterWithDispatchAndCacheConfig(t testing.TB, size uint, ds datastore.Datastore, cacheEnabled bool) ([]*grpc.ClientConn, func())
- type SafeManualResolver
- type SafeManualResolverBuilder
- func (b *SafeManualResolverBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
- func (b *SafeManualResolverBuilder) ResolveNow(prefix string)
- func (b *SafeManualResolverBuilder) Scheme() string
- func (b *SafeManualResolverBuilder) SetAddrs(prefix string, addrs []resolver.Address)
- type TempError
Constants ¶
View Source
const TestResolverScheme = "test"
Variables ¶
This section is empty.
Functions ¶
func NewTestServer ¶
func NewTestServer(require *require.Assertions, revisionQuantization time.Duration, gcWindow time.Duration, schemaPrefixRequired bool, dsInitFunc func(datastore.Datastore, *require.Assertions) (datastore.Datastore, datastore.Revision), ) (*grpc.ClientConn, func(), datastore.Datastore, decimal.Decimal)
func TestClusterWithDispatch ¶ added in v1.6.0
func TestClusterWithDispatch(t testing.TB, size uint, ds datastore.Datastore) ([]*grpc.ClientConn, func())
TestClusterWithDispatch creates a cluster with `size` nodes The cluster has a real dispatch stack that uses bufconn grpc connections
func TestClusterWithDispatchAndCacheConfig ¶ added in v1.11.0
func TestClusterWithDispatchAndCacheConfig(t testing.TB, size uint, ds datastore.Datastore, cacheEnabled bool) ([]*grpc.ClientConn, func())
TestClusterWithDispatchAndCacheConfig creates a cluster with `size` nodes and with cache toggled.
Types ¶
type SafeManualResolver ¶ added in v1.6.0
type SafeManualResolver struct {
// contains filtered or unexported fields
}
SafeManualResolver is the resolver type that SafeManualResolverBuilder builds it returns a static list of addresses
func (*SafeManualResolver) Close ¶ added in v1.6.0
func (r *SafeManualResolver) Close()
Close implements the resolver.Resolver interface
func (*SafeManualResolver) ResolveNow ¶ added in v1.6.0
func (r *SafeManualResolver) ResolveNow(options resolver.ResolveNowOptions)
ResolveNow implements the resolver.Resolver interface It sends the static list of addresses to the underlying resolver.ClientConn
type SafeManualResolverBuilder ¶ added in v1.6.0
type SafeManualResolverBuilder struct {
// contains filtered or unexported fields
}
SafeManualResolverBuilder is a resolver builder that builds SafeManualResolvers it is similar to manual.Resolver in grpc, but is thread safe
func (*SafeManualResolverBuilder) Build ¶ added in v1.6.0
func (b *SafeManualResolverBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
func (*SafeManualResolverBuilder) ResolveNow ¶ added in v1.6.0
func (b *SafeManualResolverBuilder) ResolveNow(prefix string)
func (*SafeManualResolverBuilder) Scheme ¶ added in v1.6.0
func (b *SafeManualResolverBuilder) Scheme() string
Click to show internal directories.
Click to hide internal directories.