Documentation ¶
Index ¶
- Variables
- type HTTPVersion
- func (HTTPVersion) Descriptor() protoreflect.EnumDescriptor
- func (x HTTPVersion) Enum() *HTTPVersion
- func (HTTPVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x HTTPVersion) Number() protoreflect.EnumNumber
- func (x HTTPVersion) String() string
- func (HTTPVersion) Type() protoreflect.EnumType
- type HeaderValue
- type MetaValue
- func (*MetaValue) Descriptor() ([]byte, []int)deprecated
- func (x *MetaValue) GetBool() bool
- func (x *MetaValue) GetInt() int64
- func (x *MetaValue) GetString_() string
- func (m *MetaValue) GetValue() isMetaValue_Value
- func (*MetaValue) ProtoMessage()
- func (x *MetaValue) ProtoReflect() protoreflect.Message
- func (x *MetaValue) Reset()
- func (x *MetaValue) String() string
- type MetaValue_Bool
- type MetaValue_Int
- type MetaValue_String_
- type Method
- type Module
- type ModuleContext
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() []byte
- func (x *Request) GetHeaders() map[string]*HeaderValue
- func (x *Request) GetHttpVersion() HTTPVersion
- func (x *Request) GetMeta() map[string]*MetaValue
- func (x *Request) GetMethod() Method
- func (x *Request) GetPath() string
- func (x *Request) GetTime() *timestamppb.Timestamp
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Method_name = map[int32]string{ 0: "GET", 1: "HEAD", 2: "POST", 3: "PUT", 4: "PATCH", 5: "DELETE", 6: "CONNECT", 7: "OPTIONS", 8: "TRACE", } Method_value = map[string]int32{ "GET": 0, "HEAD": 1, "POST": 2, "PUT": 3, "PATCH": 4, "DELETE": 5, "CONNECT": 6, "OPTIONS": 7, "TRACE": 8, } )
Enum value maps for Method.
View Source
var ( HTTPVersion_name = map[int32]string{ 0: "HTTP1_0", 1: "HTTP1_1", 2: "HTTP2", } HTTPVersion_value = map[string]int32{ "HTTP1_0": 0, "HTTP1_1": 1, "HTTP2": 2, } )
Enum value maps for HTTPVersion.
View Source
var File_request_proto protoreflect.FileDescriptor
View Source
var ( RequestsTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "requets_total", Help: "The total number of requets handled by the module", }, []string{"module"}) )
Functions ¶
This section is empty.
Types ¶
type HTTPVersion ¶
type HTTPVersion int32
const ( HTTPVersion_HTTP1_0 HTTPVersion = 0 HTTPVersion_HTTP1_1 HTTPVersion = 1 HTTPVersion_HTTP2 HTTPVersion = 2 )
func (HTTPVersion) Descriptor ¶ added in v1.0.12
func (HTTPVersion) Descriptor() protoreflect.EnumDescriptor
func (HTTPVersion) Enum ¶ added in v1.0.12
func (x HTTPVersion) Enum() *HTTPVersion
func (HTTPVersion) EnumDescriptor
deprecated
func (HTTPVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use HTTPVersion.Descriptor instead.
func (HTTPVersion) Number ¶ added in v1.0.12
func (x HTTPVersion) Number() protoreflect.EnumNumber
func (HTTPVersion) String ¶
func (x HTTPVersion) String() string
func (HTTPVersion) Type ¶ added in v1.0.12
func (HTTPVersion) Type() protoreflect.EnumType
type HeaderValue ¶
type HeaderValue struct { Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*HeaderValue) Descriptor
deprecated
func (*HeaderValue) Descriptor() ([]byte, []int)
Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.
func (*HeaderValue) GetValues ¶
func (x *HeaderValue) GetValues() []string
func (*HeaderValue) ProtoMessage ¶
func (*HeaderValue) ProtoMessage()
func (*HeaderValue) ProtoReflect ¶ added in v1.0.12
func (x *HeaderValue) ProtoReflect() protoreflect.Message
func (*HeaderValue) Reset ¶
func (x *HeaderValue) Reset()
func (*HeaderValue) String ¶
func (x *HeaderValue) String() string
type MetaValue ¶
type MetaValue struct { // Types that are assignable to Value: // *MetaValue_String_ // *MetaValue_Int // *MetaValue_Bool Value isMetaValue_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
func (*MetaValue) Descriptor
deprecated
func (*MetaValue) GetString_ ¶
func (*MetaValue) ProtoMessage ¶
func (*MetaValue) ProtoMessage()
func (*MetaValue) ProtoReflect ¶ added in v1.0.12
func (x *MetaValue) ProtoReflect() protoreflect.Message
type MetaValue_Bool ¶
type MetaValue_Bool struct {
Bool bool `protobuf:"varint,3,opt,name=bool,proto3,oneof"`
}
type MetaValue_Int ¶
type MetaValue_Int struct {
Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof"`
}
type MetaValue_String_ ¶
type MetaValue_String_ struct {
String_ string `protobuf:"bytes,1,opt,name=string,proto3,oneof"`
}
type Method ¶
type Method int32
func (Method) Descriptor ¶ added in v1.0.12
func (Method) Descriptor() protoreflect.EnumDescriptor
func (Method) EnumDescriptor
deprecated
func (Method) Number ¶ added in v1.0.12
func (x Method) Number() protoreflect.EnumNumber
func (Method) Type ¶ added in v1.0.12
func (Method) Type() protoreflect.EnumType
type Module ¶
type Module interface { Context() *ModuleContext SetInput(<-chan Request) Output() <-chan Request Children() [][]Module }
type ModuleContext ¶
type ModuleContext struct { Type string Name string RPS int // contains filtered or unexported fields }
func (*ModuleContext) HandledRequest ¶
func (c *ModuleContext) HandledRequest()
func (*ModuleContext) Role ¶
func (c *ModuleContext) Role() string
func (*ModuleContext) Run ¶
func (c *ModuleContext) Run()
type Request ¶
type Request struct { Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` Method Method `protobuf:"varint,2,opt,name=method,proto3,enum=mirror.Method" json:"method,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` HttpVersion HTTPVersion `protobuf:"varint,4,opt,name=http_version,json=httpVersion,proto3,enum=mirror.HTTPVersion" json:"http_version,omitempty"` Headers map[string]*HeaderValue `` /* 155-byte string literal not displayed */ Body []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` Meta map[string]*MetaValue `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetHeaders ¶
func (x *Request) GetHeaders() map[string]*HeaderValue
func (*Request) GetHttpVersion ¶
func (x *Request) GetHttpVersion() HTTPVersion
func (*Request) GetTime ¶
func (x *Request) GetTime() *timestamppb.Timestamp
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶ added in v1.0.12
func (x *Request) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.