Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetListener() *Listener
- func (x *Config) GetLogger() *Logger
- func (x *Config) GetRoutes() []*Route
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (m *Config) Validate() error
- type ConfigValidationError
- type HeaderMatcher
- func (*HeaderMatcher) Descriptor() ([]byte, []int)deprecated
- func (x *HeaderMatcher) GetExactMatch() string
- func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier
- func (x *HeaderMatcher) GetName() string
- func (*HeaderMatcher) ProtoMessage()
- func (x *HeaderMatcher) ProtoReflect() protoreflect.Message
- func (x *HeaderMatcher) Reset()
- func (x *HeaderMatcher) String() string
- func (m *HeaderMatcher) Validate() error
- type HeaderMatcherValidationError
- func (e HeaderMatcherValidationError) Cause() error
- func (e HeaderMatcherValidationError) Error() string
- func (e HeaderMatcherValidationError) ErrorName() string
- func (e HeaderMatcherValidationError) Field() string
- func (e HeaderMatcherValidationError) Key() bool
- func (e HeaderMatcherValidationError) Reason() string
- type HeaderMatcher_ExactMatch
- type Listener
- func (*Listener) Descriptor() ([]byte, []int)deprecated
- func (m *Listener) GetSocket() isListener_Socket
- func (x *Listener) GetTcp() *TCPSocket
- func (x *Listener) GetUnix() *UnixSocket
- func (*Listener) ProtoMessage()
- func (x *Listener) ProtoReflect() protoreflect.Message
- func (x *Listener) Reset()
- func (x *Listener) String() string
- func (m *Listener) Validate() error
- type ListenerValidationError
- type Listener_Tcp
- type Listener_Unix
- type Logger
- func (*Logger) Descriptor() ([]byte, []int)deprecated
- func (m *Logger) GetFormat() isLogger_Format
- func (x *Logger) GetLevel() Logger_Level
- func (x *Logger) GetPretty() bool
- func (*Logger) ProtoMessage()
- func (x *Logger) ProtoReflect() protoreflect.Message
- func (x *Logger) Reset()
- func (x *Logger) String() string
- func (m *Logger) Validate() error
- type LoggerValidationError
- type Logger_Level
- func (Logger_Level) Descriptor() protoreflect.EnumDescriptor
- func (x Logger_Level) Enum() *Logger_Level
- func (Logger_Level) EnumDescriptor() ([]byte, []int)deprecated
- func (x Logger_Level) Number() protoreflect.EnumNumber
- func (x Logger_Level) String() string
- func (Logger_Level) Type() protoreflect.EnumType
- type Logger_Pretty
- type Route
- func (*Route) Descriptor() ([]byte, []int)deprecated
- func (x *Route) GetDelay() *duration.Duration
- func (x *Route) GetMatch() *RouteMatch
- func (x *Route) GetResponseBody() string
- func (x *Route) GetResponseCode() int32
- func (x *Route) GetResponseHeaders() map[string]string
- func (*Route) ProtoMessage()
- func (x *Route) ProtoReflect() protoreflect.Message
- func (x *Route) Reset()
- func (x *Route) String() string
- func (m *Route) Validate() error
- type RouteMatch
- func (*RouteMatch) Descriptor() ([]byte, []int)deprecated
- func (x *RouteMatch) GetHeaders() []*HeaderMatcher
- func (x *RouteMatch) GetPath() string
- func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier
- func (x *RouteMatch) GetPrefix() string
- func (*RouteMatch) ProtoMessage()
- func (x *RouteMatch) ProtoReflect() protoreflect.Message
- func (x *RouteMatch) Reset()
- func (x *RouteMatch) String() string
- func (m *RouteMatch) Validate() error
- type RouteMatchValidationError
- type RouteMatch_Path
- type RouteMatch_Prefix
- type RouteValidationError
- type TCPSocket
- func (*TCPSocket) Descriptor() ([]byte, []int)deprecated
- func (x *TCPSocket) GetAddress() string
- func (x *TCPSocket) GetPort() uint32
- func (x *TCPSocket) GetSecure() bool
- func (*TCPSocket) ProtoMessage()
- func (x *TCPSocket) ProtoReflect() protoreflect.Message
- func (x *TCPSocket) Reset()
- func (x *TCPSocket) String() string
- func (m *TCPSocket) Validate() error
- type TCPSocketValidationError
- type UnixSocket
- type UnixSocketValidationError
Constants ¶
This section is empty.
Variables ¶
var ( Logger_Level_name = map[int32]string{ 0: "UNSPECIFIED", 1: "DEBUG", 2: "INFO", 3: "WARN", 4: "ERROR", 5: "PANIC", 6: "FATAL", } Logger_Level_value = map[string]int32{ "UNSPECIFIED": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, "ERROR": 4, "PANIC": 5, "FATAL": 6, } )
Enum value maps for Logger_Level.
var File_pb_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listener *Listener `protobuf:"bytes,1,opt,name=listener,proto3" json:"listener,omitempty"` Logger *Logger `protobuf:"bytes,2,opt,name=logger,proto3" json:"logger,omitempty"` // The list of routes that will be matched, in order, for incoming requests. // The first route that matches will be used. Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetListener ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
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 HeaderMatcher ¶
type HeaderMatcher struct { // Specifies the name of the header in the request. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Specifies how the header match will be performed to route the request. // // Types that are assignable to HeaderMatchSpecifier: // *HeaderMatcher_ExactMatch HeaderMatchSpecifier isHeaderMatcher_HeaderMatchSpecifier `protobuf_oneof:"header_match_specifier"` // contains filtered or unexported fields }
func (*HeaderMatcher) Descriptor
deprecated
func (*HeaderMatcher) Descriptor() ([]byte, []int)
Deprecated: Use HeaderMatcher.ProtoReflect.Descriptor instead.
func (*HeaderMatcher) GetExactMatch ¶
func (x *HeaderMatcher) GetExactMatch() string
func (*HeaderMatcher) GetHeaderMatchSpecifier ¶
func (m *HeaderMatcher) GetHeaderMatchSpecifier() isHeaderMatcher_HeaderMatchSpecifier
func (*HeaderMatcher) GetName ¶
func (x *HeaderMatcher) GetName() string
func (*HeaderMatcher) ProtoMessage ¶
func (*HeaderMatcher) ProtoMessage()
func (*HeaderMatcher) ProtoReflect ¶
func (x *HeaderMatcher) ProtoReflect() protoreflect.Message
func (*HeaderMatcher) Reset ¶
func (x *HeaderMatcher) Reset()
func (*HeaderMatcher) String ¶
func (x *HeaderMatcher) String() string
func (*HeaderMatcher) Validate ¶
func (m *HeaderMatcher) Validate() error
Validate checks the field values on HeaderMatcher with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type HeaderMatcherValidationError ¶
type HeaderMatcherValidationError struct {
// contains filtered or unexported fields
}
HeaderMatcherValidationError is the validation error returned by HeaderMatcher.Validate if the designated constraints aren't met.
func (HeaderMatcherValidationError) Cause ¶
func (e HeaderMatcherValidationError) Cause() error
Cause function returns cause value.
func (HeaderMatcherValidationError) Error ¶
func (e HeaderMatcherValidationError) Error() string
Error satisfies the builtin error interface
func (HeaderMatcherValidationError) ErrorName ¶
func (e HeaderMatcherValidationError) ErrorName() string
ErrorName returns error name.
func (HeaderMatcherValidationError) Field ¶
func (e HeaderMatcherValidationError) Field() string
Field function returns field value.
func (HeaderMatcherValidationError) Key ¶
func (e HeaderMatcherValidationError) Key() bool
Key function returns key value.
func (HeaderMatcherValidationError) Reason ¶
func (e HeaderMatcherValidationError) Reason() string
Reason function returns reason value.
type HeaderMatcher_ExactMatch ¶
type HeaderMatcher_ExactMatch struct { // If specified, header match will be performed based on the value of the header. ExactMatch string `protobuf:"bytes,4,opt,name=exact_match,json=exactMatch,proto3,oneof"` }
type Listener ¶
type Listener struct { // Types that are assignable to Socket: // *Listener_Tcp // *Listener_Unix Socket isListener_Socket `protobuf_oneof:"socket"` // contains filtered or unexported fields }
func (*Listener) Descriptor
deprecated
func (*Listener) GetUnix ¶
func (x *Listener) GetUnix() *UnixSocket
func (*Listener) ProtoMessage ¶
func (*Listener) ProtoMessage()
func (*Listener) ProtoReflect ¶
func (x *Listener) ProtoReflect() protoreflect.Message
type ListenerValidationError ¶
type ListenerValidationError struct {
// contains filtered or unexported fields
}
ListenerValidationError is the validation error returned by Listener.Validate if the designated constraints aren't met.
func (ListenerValidationError) Cause ¶
func (e ListenerValidationError) Cause() error
Cause function returns cause value.
func (ListenerValidationError) Error ¶
func (e ListenerValidationError) Error() string
Error satisfies the builtin error interface
func (ListenerValidationError) ErrorName ¶
func (e ListenerValidationError) ErrorName() string
ErrorName returns error name.
func (ListenerValidationError) Field ¶
func (e ListenerValidationError) Field() string
Field function returns field value.
func (ListenerValidationError) Key ¶
func (e ListenerValidationError) Key() bool
Key function returns key value.
func (ListenerValidationError) Reason ¶
func (e ListenerValidationError) Reason() string
Reason function returns reason value.
type Listener_Tcp ¶
type Listener_Tcp struct {
Tcp *TCPSocket `protobuf:"bytes,1,opt,name=tcp,proto3,oneof"`
}
type Listener_Unix ¶
type Listener_Unix struct {
Unix *UnixSocket `protobuf:"bytes,2,opt,name=unix,proto3,oneof"`
}
type Logger ¶
type Logger struct { Level Logger_Level `protobuf:"varint,1,opt,name=level,proto3,enum=pb.Logger_Level" json:"level,omitempty"` // Types that are assignable to Format: // *Logger_Pretty Format isLogger_Format `protobuf_oneof:"format"` // contains filtered or unexported fields }
func (*Logger) Descriptor
deprecated
func (*Logger) GetLevel ¶
func (x *Logger) GetLevel() Logger_Level
func (*Logger) ProtoMessage ¶
func (*Logger) ProtoMessage()
func (*Logger) ProtoReflect ¶
func (x *Logger) ProtoReflect() protoreflect.Message
type LoggerValidationError ¶
type LoggerValidationError struct {
// contains filtered or unexported fields
}
LoggerValidationError is the validation error returned by Logger.Validate if the designated constraints aren't met.
func (LoggerValidationError) Cause ¶
func (e LoggerValidationError) Cause() error
Cause function returns cause value.
func (LoggerValidationError) Error ¶
func (e LoggerValidationError) Error() string
Error satisfies the builtin error interface
func (LoggerValidationError) ErrorName ¶
func (e LoggerValidationError) ErrorName() string
ErrorName returns error name.
func (LoggerValidationError) Field ¶
func (e LoggerValidationError) Field() string
Field function returns field value.
func (LoggerValidationError) Key ¶
func (e LoggerValidationError) Key() bool
Key function returns key value.
func (LoggerValidationError) Reason ¶
func (e LoggerValidationError) Reason() string
Reason function returns reason value.
type Logger_Level ¶
type Logger_Level int32
const ( Logger_UNSPECIFIED Logger_Level = 0 Logger_DEBUG Logger_Level = 1 Logger_INFO Logger_Level = 2 Logger_WARN Logger_Level = 3 Logger_ERROR Logger_Level = 4 Logger_PANIC Logger_Level = 5 Logger_FATAL Logger_Level = 6 )
func (Logger_Level) Descriptor ¶
func (Logger_Level) Descriptor() protoreflect.EnumDescriptor
func (Logger_Level) Enum ¶
func (x Logger_Level) Enum() *Logger_Level
func (Logger_Level) EnumDescriptor
deprecated
func (Logger_Level) EnumDescriptor() ([]byte, []int)
Deprecated: Use Logger_Level.Descriptor instead.
func (Logger_Level) Number ¶
func (x Logger_Level) Number() protoreflect.EnumNumber
func (Logger_Level) String ¶
func (x Logger_Level) String() string
func (Logger_Level) Type ¶
func (Logger_Level) Type() protoreflect.EnumType
type Logger_Pretty ¶
type Logger_Pretty struct {
Pretty bool `protobuf:"varint,2,opt,name=pretty,proto3,oneof"`
}
type Route ¶
type Route struct { // Route matching parameters. Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` ResponseCode int32 `protobuf:"varint,2,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` ResponseHeaders map[string]string `` /* 194-byte string literal not displayed */ ResponseBody string `protobuf:"bytes,4,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` Delay *duration.Duration `protobuf:"bytes,5,opt,name=delay,proto3" json:"delay,omitempty"` // contains filtered or unexported fields }
For my need first
func (*Route) Descriptor
deprecated
func (*Route) GetMatch ¶
func (x *Route) GetMatch() *RouteMatch
func (*Route) GetResponseBody ¶
func (*Route) GetResponseCode ¶
func (*Route) GetResponseHeaders ¶
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) ProtoReflect ¶
func (x *Route) ProtoReflect() protoreflect.Message
type RouteMatch ¶
type RouteMatch struct { // Types that are assignable to PathSpecifier: // *RouteMatch_Prefix // *RouteMatch_Path PathSpecifier isRouteMatch_PathSpecifier `protobuf_oneof:"path_specifier"` // Specifies a set of headers that the route should match on. The router will // check the request’s headers against all the specified headers in the route // config. A match will happen if all the headers in the route are present in // the request with the same values (or based on presence if the value field // is not in the config). Headers []*HeaderMatcher `protobuf:"bytes,6,rep,name=headers,proto3" json:"headers,omitempty"` // contains filtered or unexported fields }
func (*RouteMatch) Descriptor
deprecated
func (*RouteMatch) Descriptor() ([]byte, []int)
Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead.
func (*RouteMatch) GetHeaders ¶
func (x *RouteMatch) GetHeaders() []*HeaderMatcher
func (*RouteMatch) GetPath ¶
func (x *RouteMatch) GetPath() string
func (*RouteMatch) GetPathSpecifier ¶
func (m *RouteMatch) GetPathSpecifier() isRouteMatch_PathSpecifier
func (*RouteMatch) GetPrefix ¶
func (x *RouteMatch) GetPrefix() string
func (*RouteMatch) ProtoMessage ¶
func (*RouteMatch) ProtoMessage()
func (*RouteMatch) ProtoReflect ¶
func (x *RouteMatch) ProtoReflect() protoreflect.Message
func (*RouteMatch) Reset ¶
func (x *RouteMatch) Reset()
func (*RouteMatch) String ¶
func (x *RouteMatch) String() string
func (*RouteMatch) Validate ¶
func (m *RouteMatch) Validate() error
Validate checks the field values on RouteMatch with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RouteMatchValidationError ¶
type RouteMatchValidationError struct {
// contains filtered or unexported fields
}
RouteMatchValidationError is the validation error returned by RouteMatch.Validate if the designated constraints aren't met.
func (RouteMatchValidationError) Cause ¶
func (e RouteMatchValidationError) Cause() error
Cause function returns cause value.
func (RouteMatchValidationError) Error ¶
func (e RouteMatchValidationError) Error() string
Error satisfies the builtin error interface
func (RouteMatchValidationError) ErrorName ¶
func (e RouteMatchValidationError) ErrorName() string
ErrorName returns error name.
func (RouteMatchValidationError) Field ¶
func (e RouteMatchValidationError) Field() string
Field function returns field value.
func (RouteMatchValidationError) Key ¶
func (e RouteMatchValidationError) Key() bool
Key function returns key value.
func (RouteMatchValidationError) Reason ¶
func (e RouteMatchValidationError) Reason() string
Reason function returns reason value.
type RouteMatch_Path ¶
type RouteMatch_Path struct { // If specified, the route is an exact path rule meaning that the path must // exactly match the *:path* header once the query string is removed. Path string `protobuf:"bytes,2,opt,name=path,proto3,oneof"` }
type RouteMatch_Prefix ¶
type RouteMatch_Prefix struct { // If specified, the route is a prefix rule meaning that the prefix must // match the beginning of the *:path* header. Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3,oneof"` }
type RouteValidationError ¶
type RouteValidationError struct {
// contains filtered or unexported fields
}
RouteValidationError is the validation error returned by Route.Validate if the designated constraints aren't met.
func (RouteValidationError) Cause ¶
func (e RouteValidationError) Cause() error
Cause function returns cause value.
func (RouteValidationError) Error ¶
func (e RouteValidationError) Error() string
Error satisfies the builtin error interface
func (RouteValidationError) ErrorName ¶
func (e RouteValidationError) ErrorName() string
ErrorName returns error name.
func (RouteValidationError) Field ¶
func (e RouteValidationError) Field() string
Field function returns field value.
func (RouteValidationError) Key ¶
func (e RouteValidationError) Key() bool
Key function returns key value.
func (RouteValidationError) Reason ¶
func (e RouteValidationError) Reason() string
Reason function returns reason value.
type TCPSocket ¶
type TCPSocket struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` Secure bool `protobuf:"varint,3,opt,name=secure,proto3" json:"secure,omitempty"` // contains filtered or unexported fields }
func (*TCPSocket) Descriptor
deprecated
func (*TCPSocket) GetAddress ¶
func (*TCPSocket) ProtoMessage ¶
func (*TCPSocket) ProtoMessage()
func (*TCPSocket) ProtoReflect ¶
func (x *TCPSocket) ProtoReflect() protoreflect.Message
type TCPSocketValidationError ¶
type TCPSocketValidationError struct {
// contains filtered or unexported fields
}
TCPSocketValidationError is the validation error returned by TCPSocket.Validate if the designated constraints aren't met.
func (TCPSocketValidationError) Cause ¶
func (e TCPSocketValidationError) Cause() error
Cause function returns cause value.
func (TCPSocketValidationError) Error ¶
func (e TCPSocketValidationError) Error() string
Error satisfies the builtin error interface
func (TCPSocketValidationError) ErrorName ¶
func (e TCPSocketValidationError) ErrorName() string
ErrorName returns error name.
func (TCPSocketValidationError) Field ¶
func (e TCPSocketValidationError) Field() string
Field function returns field value.
func (TCPSocketValidationError) Key ¶
func (e TCPSocketValidationError) Key() bool
Key function returns key value.
func (TCPSocketValidationError) Reason ¶
func (e TCPSocketValidationError) Reason() string
Reason function returns reason value.
type UnixSocket ¶
type UnixSocket struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // contains filtered or unexported fields }
func (*UnixSocket) Descriptor
deprecated
func (*UnixSocket) Descriptor() ([]byte, []int)
Deprecated: Use UnixSocket.ProtoReflect.Descriptor instead.
func (*UnixSocket) GetPath ¶
func (x *UnixSocket) GetPath() string
func (*UnixSocket) ProtoMessage ¶
func (*UnixSocket) ProtoMessage()
func (*UnixSocket) ProtoReflect ¶
func (x *UnixSocket) ProtoReflect() protoreflect.Message
func (*UnixSocket) Reset ¶
func (x *UnixSocket) Reset()
func (*UnixSocket) String ¶
func (x *UnixSocket) String() string
func (*UnixSocket) Validate ¶
func (m *UnixSocket) Validate() error
Validate checks the field values on UnixSocket with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type UnixSocketValidationError ¶
type UnixSocketValidationError struct {
// contains filtered or unexported fields
}
UnixSocketValidationError is the validation error returned by UnixSocket.Validate if the designated constraints aren't met.
func (UnixSocketValidationError) Cause ¶
func (e UnixSocketValidationError) Cause() error
Cause function returns cause value.
func (UnixSocketValidationError) Error ¶
func (e UnixSocketValidationError) Error() string
Error satisfies the builtin error interface
func (UnixSocketValidationError) ErrorName ¶
func (e UnixSocketValidationError) ErrorName() string
ErrorName returns error name.
func (UnixSocketValidationError) Field ¶
func (e UnixSocketValidationError) Field() string
Field function returns field value.
func (UnixSocketValidationError) Key ¶
func (e UnixSocketValidationError) Key() bool
Key function returns key value.
func (UnixSocketValidationError) Reason ¶
func (e UnixSocketValidationError) Reason() string
Reason function returns reason value.