testserver

package
v1.21.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Overview

Code generated by github.com/ecordell/optgen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GRPCServer               util.GRPCServerConfig
	ReadOnlyGRPCServer       util.GRPCServerConfig
	HTTPGateway              util.HTTPServerConfig
	ReadOnlyHTTPGateway      util.HTTPServerConfig
	LoadConfigs              []string
	MaximumUpdatesPerWrite   uint16
	MaximumPreconditionCount uint16
	MaxCaveatContextSize     int
}

func ConfigWithOptions

func ConfigWithOptions(c *Config, opts ...ConfigOption) *Config

ConfigWithOptions configures an existing Config with the passed in options set

func NewConfigWithOptions

func NewConfigWithOptions(opts ...ConfigOption) *Config

NewConfigWithOptions creates a new Config with the passed in options set

func (*Config) Complete

func (c *Config) Complete() (RunnableTestServer, error)

func (*Config) ToOption

func (c *Config) ToOption() ConfigOption

ToOption returns a new ConfigOption that sets the values from the passed in Config

type ConfigOption

type ConfigOption func(c *Config)

func SetLoadConfigs

func SetLoadConfigs(loadConfigs []string) ConfigOption

SetLoadConfigs returns an option that can set LoadConfigs on a Config

func WithGRPCServer

func WithGRPCServer(gRPCServer util.GRPCServerConfig) ConfigOption

WithGRPCServer returns an option that can set GRPCServer on a Config

func WithHTTPGateway added in v1.11.0

func WithHTTPGateway(hTTPGateway util.HTTPServerConfig) ConfigOption

WithHTTPGateway returns an option that can set HTTPGateway on a Config

func WithLoadConfigs

func WithLoadConfigs(loadConfigs string) ConfigOption

WithLoadConfigs returns an option that can append LoadConfigss to Config.LoadConfigs

func WithMaxCaveatContextSize added in v1.18.0

func WithMaxCaveatContextSize(maxCaveatContextSize int) ConfigOption

WithMaxCaveatContextSize returns an option that can set MaxCaveatContextSize on a Config

func WithMaximumPreconditionCount added in v1.12.0

func WithMaximumPreconditionCount(maximumPreconditionCount uint16) ConfigOption

WithMaximumPreconditionCount returns an option that can set MaximumPreconditionCount on a Config

func WithMaximumUpdatesPerWrite added in v1.12.0

func WithMaximumUpdatesPerWrite(maximumUpdatesPerWrite uint16) ConfigOption

WithMaximumUpdatesPerWrite returns an option that can set MaximumUpdatesPerWrite on a Config

func WithReadOnlyGRPCServer

func WithReadOnlyGRPCServer(readOnlyGRPCServer util.GRPCServerConfig) ConfigOption

WithReadOnlyGRPCServer returns an option that can set ReadOnlyGRPCServer on a Config

func WithReadOnlyHTTPGateway added in v1.11.0

func WithReadOnlyHTTPGateway(readOnlyHTTPGateway util.HTTPServerConfig) ConfigOption

WithReadOnlyHTTPGateway returns an option that can set ReadOnlyHTTPGateway on a Config

type RunnableTestServer

type RunnableTestServer interface {
	Run(ctx context.Context) error
	GRPCDialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
	ReadOnlyGRPCDialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
}

Jump to

Keyboard shortcuts

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