task

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryType_name = map[int32]string{
	0:   "UNKNOWN_QUERY_TYPE",
	1:   "FLOW_PARAM",
	2:   "FLOW_ID",
	3:   "COMMUNITY_ID",
	254: "MOCK_QUERY",
}
View Source
var QueryType_value = map[string]int32{
	"UNKNOWN_QUERY_TYPE": 0,
	"FLOW_PARAM":         1,
	"FLOW_ID":            2,
	"COMMUNITY_ID":       3,
	"MOCK_QUERY":         254,
}

Functions

This section is empty.

Types

type FlowParam

type FlowParam struct {
	// Network contains a network protocol identifier and is expected to contain
	// the same values as are commonly used in go's net package. Currently only
	// "tcp" and "udp" are supported.
	Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	// SrcHostPort contains a "host and port string" for the source endpoint.
	// Values are expected to adhere to the output of go's net.JoinHostPort
	// function, i.e., "host:port", or, "[host]:port".
	SrcHostPort string `protobuf:"bytes,2,opt,name=src_host_port,json=srcHostPort,proto3" json:"src_host_port,omitempty"`
	// DstHostPort contains a "host and port string" for the destination
	// endpoint. Values are expected to adhere to the output of go's
	// net.JoinHostPort function, i.e., "host:port", or, "[host]:port".
	DstHostPort          string   `protobuf:"bytes,3,opt,name=dst_host_port,json=dstHostPort,proto3" json:"dst_host_port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

FlowParam contains parameters for flow queries.

func (*FlowParam) Descriptor

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

func (*FlowParam) GetDstHostPort

func (m *FlowParam) GetDstHostPort() string

func (*FlowParam) GetNetwork

func (m *FlowParam) GetNetwork() string

func (*FlowParam) GetSrcHostPort

func (m *FlowParam) GetSrcHostPort() string

func (*FlowParam) ProtoMessage

func (*FlowParam) ProtoMessage()

func (*FlowParam) Reset

func (m *FlowParam) Reset()

func (*FlowParam) String

func (m *FlowParam) String() string

func (*FlowParam) XXX_DiscardUnknown

func (m *FlowParam) XXX_DiscardUnknown()

func (*FlowParam) XXX_Marshal

func (m *FlowParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FlowParam) XXX_Merge

func (m *FlowParam) XXX_Merge(src proto.Message)

func (*FlowParam) XXX_Size

func (m *FlowParam) XXX_Size() int

func (*FlowParam) XXX_Unmarshal

func (m *FlowParam) XXX_Unmarshal(b []byte) error

type MockQuery

type MockQuery struct {
	Mock                 string   `protobuf:"bytes,1,opt,name=mock,proto3" json:"mock,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

MockQuery is fore testing purposes only.

func (*MockQuery) Descriptor

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

func (*MockQuery) GetMock

func (m *MockQuery) GetMock() string

func (*MockQuery) ProtoMessage

func (*MockQuery) ProtoMessage()

func (*MockQuery) Reset

func (m *MockQuery) Reset()

func (*MockQuery) String

func (m *MockQuery) String() string

func (*MockQuery) XXX_DiscardUnknown

func (m *MockQuery) XXX_DiscardUnknown()

func (*MockQuery) XXX_Marshal

func (m *MockQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MockQuery) XXX_Merge

func (m *MockQuery) XXX_Merge(src proto.Message)

func (*MockQuery) XXX_Size

func (m *MockQuery) XXX_Size() int

func (*MockQuery) XXX_Unmarshal

func (m *MockQuery) XXX_Unmarshal(b []byte) error

type Query

type Query struct {
	// Type specifies the query type.
	Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=task.QueryType" json:"type,omitempty"`
	// BeforeTime is the point in time before which packets are queried for.
	BeforeTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=before_time,json=beforeTime,proto3" json:"before_time,omitempty"`
	// AfterTime is the point in time after which packets are queried for.
	AfterTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=after_time,json=afterTime,proto3" json:"after_time,omitempty"`
	// Content contains the Query type-specific parameters.
	//
	// Types that are valid to be assigned to Content:
	//	*Query_FlowParam
	//	*Query_MockQuery
	Content              isQuery_Content `protobuf_oneof:"content"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Query encapsulates various query types to be processed by stenosis. Query messages are expected to be forwarded as JSON-marshaled data via stenosis REST API endpoint (typically as ad-hoc queries) or as gRPC messages (typically by FEVER).

func (*Query) Descriptor

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

func (*Query) GetAfterTime

func (m *Query) GetAfterTime() *timestamp.Timestamp

func (*Query) GetBeforeTime

func (m *Query) GetBeforeTime() *timestamp.Timestamp

func (*Query) GetContent

func (m *Query) GetContent() isQuery_Content

func (*Query) GetFlowParam

func (m *Query) GetFlowParam() *FlowParam

func (*Query) GetMockQuery

func (m *Query) GetMockQuery() *MockQuery

func (*Query) GetType

func (m *Query) GetType() QueryType

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_OneofWrappers

func (*Query) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type QueryType

type QueryType int32

QueryType specifies the kind of query in a Query message.

const (
	QueryType_UNKNOWN_QUERY_TYPE QueryType = 0
	QueryType_FLOW_PARAM         QueryType = 1
	QueryType_FLOW_ID            QueryType = 2
	QueryType_COMMUNITY_ID       QueryType = 3
	QueryType_MOCK_QUERY         QueryType = 254
)

func (QueryType) EnumDescriptor

func (QueryType) EnumDescriptor() ([]byte, []int)

func (QueryType) String

func (x QueryType) String() string

type Query_FlowParam

type Query_FlowParam struct {
	FlowParam *FlowParam `protobuf:"bytes,4,opt,name=flow_param,json=flowParam,proto3,oneof"`
}

type Query_MockQuery

type Query_MockQuery struct {
	MockQuery *MockQuery `protobuf:"bytes,14,opt,name=mock_query,json=mockQuery,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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