dataplane

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_plugins_tests_integration_dataplane_config_proto protoreflect.FileDescriptor

Functions

func Bootstrap

func Bootstrap() *bootstrap

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Config) ValidateAll

func (m *Config) ValidateAll() error

ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.

type ConfigMultiError

type ConfigMultiError []error

ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.

func (ConfigMultiError) AllErrors

func (m ConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigMultiError) Error

func (m ConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConfigValidationError

type ConfigValidationError struct {
	// contains filtered or unexported fields
}

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type DataPlane

type DataPlane struct {
	// contains filtered or unexported fields
}

func StartDataPlane

func StartDataPlane(t *testing.T, opt *Option) (*DataPlane, error)

func (*DataPlane) AdminAPIPort added in v0.5.0

func (dp *DataPlane) AdminAPIPort() int

func (*DataPlane) Configured

func (dp *DataPlane) Configured() bool

func (*DataPlane) Delete

func (dp *DataPlane) Delete(path string, header http.Header) (*http.Response, error)

func (*DataPlane) FlushCoverage

func (dp *DataPlane) FlushCoverage() error

func (*DataPlane) Get

func (dp *DataPlane) Get(path string, header http.Header) (*http.Response, error)

func (*DataPlane) Grpcurl added in v0.4.1

func (dp *DataPlane) Grpcurl(importPath, protoFile, fullMethodName, req string) ([]byte, error)

Use grpcurl so that the caller can specify the proto file without building the Go code. TODO: we can rewrite this in Go.

func (*DataPlane) Head

func (dp *DataPlane) Head(path string, header http.Header) (*http.Response, error)

func (*DataPlane) Patch

func (dp *DataPlane) Patch(path string, header http.Header, body io.Reader) (*http.Response, error)

func (*DataPlane) Port added in v0.5.0

func (dp *DataPlane) Port() int

func (*DataPlane) Post

func (dp *DataPlane) Post(path string, header http.Header, body io.Reader) (*http.Response, error)

func (*DataPlane) PostWithTrailer added in v0.4.1

func (dp *DataPlane) PostWithTrailer(path string, header http.Header, body io.Reader, trailer http.Header) (*http.Response, error)

func (*DataPlane) Put

func (dp *DataPlane) Put(path string, header http.Header, body io.Reader) (*http.Response, error)

func (*DataPlane) SendAndCancelRequest

func (dp *DataPlane) SendAndCancelRequest(path string, after time.Duration) error

func (*DataPlane) SetLogLevel

func (dp *DataPlane) SetLogLevel(loggerName string, level string) error

func (*DataPlane) Stop

func (dp *DataPlane) Stop()

type HTTPFilterInsertOperation added in v0.5.0

type HTTPFilterInsertOperation int
const (
	HTTPFilterInsertOperationBeforeRouter HTTPFilterInsertOperation = iota
)

type Option

type Option struct {
	LogLevel  string
	Envs      map[string]string
	Bootstrap *bootstrap

	NoErrorLogCheck    bool
	ExpectLogPattern   []string
	ExpectNoLogPattern []string
}

Jump to

Keyboard shortcuts

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