Documentation ¶
Overview ¶
Package mirror is a generated protocol buffer package.
It is generated from these files:
request.proto
It has these top-level messages:
HeaderValue MetaValue Request
Index ¶
- Variables
- type HTTPVersion
- type HeaderValue
- type MetaValue
- func (*MetaValue) Descriptor() ([]byte, []int)
- func (m *MetaValue) GetBool() bool
- func (m *MetaValue) GetInt() int64
- func (m *MetaValue) GetString_() string
- func (m *MetaValue) GetValue() isMetaValue_Value
- func (*MetaValue) ProtoMessage()
- func (m *MetaValue) Reset()
- func (m *MetaValue) String() string
- func (*MetaValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type MetaValue_Bool
- type MetaValue_Int
- type MetaValue_String_
- type Method
- type Module
- type ModuleContext
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetBody() []byte
- func (m *Request) GetHeaders() map[string]*HeaderValue
- func (m *Request) GetHttpVersion() HTTPVersion
- func (m *Request) GetMeta() map[string]*MetaValue
- func (m *Request) GetMethod() Method
- func (m *Request) GetPath() string
- func (m *Request) GetTime() *google_protobuf.Timestamp
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var HTTPVersion_name = map[int32]string{
0: "HTTP1_0",
1: "HTTP1_1",
2: "HTTP2",
}
View Source
var HTTPVersion_value = map[string]int32{
"HTTP1_0": 0,
"HTTP1_1": 1,
"HTTP2": 2,
}
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",
}
View Source
var Method_value = map[string]int32{
"GET": 0,
"HEAD": 1,
"POST": 2,
"PUT": 3,
"PATCH": 4,
"DELETE": 5,
"CONNECT": 6,
"OPTIONS": 7,
"TRACE": 8,
}
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) EnumDescriptor ¶
func (HTTPVersion) EnumDescriptor() ([]byte, []int)
func (HTTPVersion) String ¶
func (x HTTPVersion) String() string
type HeaderValue ¶
type HeaderValue struct {
Values []string `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"`
}
func (*HeaderValue) Descriptor ¶
func (*HeaderValue) Descriptor() ([]byte, []int)
func (*HeaderValue) GetValues ¶
func (m *HeaderValue) GetValues() []string
func (*HeaderValue) ProtoMessage ¶
func (*HeaderValue) ProtoMessage()
func (*HeaderValue) Reset ¶
func (m *HeaderValue) Reset()
func (*HeaderValue) String ¶
func (m *HeaderValue) String() string
type MetaValue ¶
type MetaValue struct { // Types that are valid to be assigned to Value: // *MetaValue_String_ // *MetaValue_Int // *MetaValue_Bool Value isMetaValue_Value `protobuf_oneof:"value"` }
func (*MetaValue) Descriptor ¶
func (*MetaValue) GetString_ ¶
func (*MetaValue) ProtoMessage ¶
func (*MetaValue) ProtoMessage()
type MetaValue_Bool ¶
type MetaValue_Bool struct {
Bool bool `protobuf:"varint,3,opt,name=bool,oneof"`
}
type MetaValue_Int ¶
type MetaValue_Int struct {
Int int64 `protobuf:"varint,2,opt,name=int,oneof"`
}
type MetaValue_String_ ¶
type MetaValue_String_ struct {
String_ string `protobuf:"bytes,1,opt,name=string,oneof"`
}
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 *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=time" json:"time,omitempty"` Method Method `protobuf:"varint,2,opt,name=method,enum=mirror.Method" json:"method,omitempty"` Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` HttpVersion HTTPVersion `protobuf:"varint,4,opt,name=http_version,json=httpVersion,enum=mirror.HTTPVersion" json:"http_version,omitempty"` Headers map[string]*HeaderValue `` /* 134-byte string literal not displayed */ Body []byte `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` Meta map[string]*MetaValue `` /* 128-byte string literal not displayed */ }
func (*Request) Descriptor ¶
func (*Request) GetHeaders ¶
func (m *Request) GetHeaders() map[string]*HeaderValue
func (*Request) GetHttpVersion ¶
func (m *Request) GetHttpVersion() HTTPVersion
func (*Request) GetTime ¶
func (m *Request) GetTime() *google_protobuf.Timestamp
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.