Documentation ¶
Index ¶
- Constants
- Variables
- func CapWeightFunc(n Node) float64
- func PriceWeightFunc(n Node) float64
- type Aggregator
- type AggregatorFactory
- type Bucket
- func (b *Bucket) AddBucket(o string, n Nodes) error
- func (b *Bucket) AddChild(c Bucket)
- func (b *Bucket) AddNode(n uint32, opts ...string) error
- func (b *Bucket) AddStrawNode(n Node, opts ...string) error
- func (b Bucket) CheckConflicts(b1 Bucket) bool
- func (b Bucket) Children() []Bucket
- func (b Bucket) Copy() (bc Bucket)
- func (b Bucket) Dump(name string) error
- func (b Bucket) DumpWithSelection(name string, b1 Bucket) error
- func (b Bucket) Equals(b1 Bucket) bool
- func (b *Bucket) FindGraph(pivot []byte, ss ...SFGroup) (c *Bucket)
- func (b *Bucket) FindNodes(pivot []byte, ss ...SFGroup) (nodes Nodes)
- func (b Bucket) GetMaxSelection(s SFGroup) (r *Bucket)
- func (b Bucket) GetNodesByOption(opts ...string) Nodes
- func (b Bucket) GetSelection(ss []Select, pivot []byte) *Bucket
- func (b Bucket) Hash() uint64
- func (b Bucket) IsValid() bool
- func (b Bucket) MarshalBinary() ([]byte, error)
- func (b *Bucket) Merge(b1 Bucket)
- func (b Bucket) Name() string
- func (b Bucket) Nodelist() (r Nodes)
- func (b *Bucket) Read(r io.Reader) error
- func (b Bucket) Sdump() (string, error)
- func (b Bucket) SdumpWithSelection(b1 Bucket) (string, error)
- func (b *Bucket) Traverse(a Aggregator, wf WeightFunc) Aggregator
- func (b *Bucket) TraverseTree(af AggregatorFactory, wf WeightFunc)
- func (b *Bucket) UnmarshalBinary(data []byte) (err error)
- func (b *Bucket) UpdateIndices(tr map[uint32]Node) Bucket
- func (b Bucket) Write(w io.Writer) error
- type Filter
- func (f Filter) Check(b Bucket) bool
- func (*Filter) Descriptor() ([]byte, []int)
- func (f Filter) Filter(bs ...Bucket) []Bucket
- func (m *Filter) GetF() *SimpleFilter
- func (m *Filter) GetKey() string
- func (m *Filter) Marshal() (dAtA []byte, err error)
- func (m *Filter) MarshalTo(dAtA []byte) (int, error)
- func (m *Filter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) Size() (n int)
- func (m *Filter) String() string
- func (m *Filter) Unmarshal(dAtA []byte) error
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type FilterFunc
- type Graph
- type Node
- type Nodes
- type Normalizer
- type Operation
- type PlacementRule
- func (*PlacementRule) Descriptor() ([]byte, []int)
- func (m *PlacementRule) GetReplFactor() uint32
- func (m *PlacementRule) GetSFGroups() []SFGroup
- func (m *PlacementRule) Marshal() (dAtA []byte, err error)
- func (m *PlacementRule) MarshalTo(dAtA []byte) (int, error)
- func (m *PlacementRule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PlacementRule) ProtoMessage()
- func (m *PlacementRule) Reset()
- func (m *PlacementRule) Size() (n int)
- func (m *PlacementRule) String() string
- func (m *PlacementRule) Unmarshal(dAtA []byte) error
- func (m *PlacementRule) XXX_DiscardUnknown()
- func (m *PlacementRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlacementRule) XXX_Merge(src proto.Message)
- func (m *PlacementRule) XXX_Size() int
- func (m *PlacementRule) XXX_Unmarshal(b []byte) error
- type Policy
- type SFGroup
- func (*SFGroup) Descriptor() ([]byte, []int)
- func (m *SFGroup) GetExclude() []uint32
- func (m *SFGroup) GetFilters() []Filter
- func (m *SFGroup) GetSelectors() []Select
- func (m *SFGroup) Marshal() (dAtA []byte, err error)
- func (m *SFGroup) MarshalTo(dAtA []byte) (int, error)
- func (m *SFGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SFGroup) ProtoMessage()
- func (m *SFGroup) Reset()
- func (m *SFGroup) Size() (n int)
- func (m *SFGroup) String() string
- func (m *SFGroup) Unmarshal(dAtA []byte) error
- func (m *SFGroup) XXX_DiscardUnknown()
- func (m *SFGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SFGroup) XXX_Merge(src proto.Message)
- func (m *SFGroup) XXX_Size() int
- func (m *SFGroup) XXX_Unmarshal(b []byte) error
- type Select
- func (*Select) Descriptor() ([]byte, []int)
- func (m *Select) GetCount() uint32
- func (m *Select) GetKey() string
- func (m *Select) Marshal() (dAtA []byte, err error)
- func (m *Select) MarshalTo(dAtA []byte) (int, error)
- func (m *Select) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Select) ProtoMessage()
- func (m *Select) Reset()
- func (m *Select) Size() (n int)
- func (m *Select) String() string
- func (m *Select) Unmarshal(dAtA []byte) error
- func (m *Select) XXX_DiscardUnknown()
- func (m *Select) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Select) XXX_Merge(src proto.Message)
- func (m *Select) XXX_Size() int
- func (m *Select) XXX_Unmarshal(b []byte) error
- type SimpleFilter
- func FilterAND(fs ...*SimpleFilter) *SimpleFilter
- func FilterEQ(v string) *SimpleFilter
- func FilterGE(v int64) *SimpleFilter
- func FilterGT(v int64) *SimpleFilter
- func FilterIn(values ...string) *SimpleFilter
- func FilterLE(v int64) *SimpleFilter
- func FilterLT(v int64) *SimpleFilter
- func FilterNE(v string) *SimpleFilter
- func FilterNotIn(values ...string) *SimpleFilter
- func FilterOR(fs ...*SimpleFilter) *SimpleFilter
- func NewFilter(op Operation, value string) *SimpleFilter
- func (sf SimpleFilter) Check(value string) bool
- func (*SimpleFilter) Descriptor() ([]byte, []int)
- func (m *SimpleFilter) GetArgs() isSimpleFilter_Args
- func (m *SimpleFilter) GetFArgs() *SimpleFilters
- func (m *SimpleFilter) GetOp() Operation
- func (m *SimpleFilter) GetValue() string
- func (m *SimpleFilter) Marshal() (dAtA []byte, err error)
- func (m *SimpleFilter) MarshalTo(dAtA []byte) (int, error)
- func (m *SimpleFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SimpleFilter) ProtoMessage()
- func (m *SimpleFilter) Reset()
- func (m *SimpleFilter) Size() (n int)
- func (m *SimpleFilter) String() string
- func (m *SimpleFilter) Unmarshal(dAtA []byte) error
- func (m *SimpleFilter) XXX_DiscardUnknown()
- func (m *SimpleFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SimpleFilter) XXX_Merge(src proto.Message)
- func (*SimpleFilter) XXX_OneofWrappers() []interface{}
- func (m *SimpleFilter) XXX_Size() int
- func (m *SimpleFilter) XXX_Unmarshal(b []byte) error
- type SimpleFilter_FArgs
- type SimpleFilter_Value
- type SimpleFilters
- func (*SimpleFilters) Descriptor() ([]byte, []int)
- func (m *SimpleFilters) GetFilters() []SimpleFilter
- func (m *SimpleFilters) Marshal() (dAtA []byte, err error)
- func (m *SimpleFilters) MarshalTo(dAtA []byte) (int, error)
- func (m *SimpleFilters) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SimpleFilters) ProtoMessage()
- func (m *SimpleFilters) Reset()
- func (m *SimpleFilters) Size() (n int)
- func (m *SimpleFilters) String() string
- func (m *SimpleFilters) Unmarshal(dAtA []byte) error
- func (m *SimpleFilters) XXX_DiscardUnknown()
- func (m *SimpleFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SimpleFilters) XXX_Merge(src proto.Message)
- func (m *SimpleFilters) XXX_Size() int
- func (m *SimpleFilters) XXX_Unmarshal(b []byte) error
- type Type
- type WeightFunc
Constants ¶
const ( // Separator separates key:value pairs in string representation of options. Separator = "/" // NodesBucket is the name for optionless bucket containing only nodes. NodesBucket = "Node" )
Variables ¶
var ( ErrInvalidLengthSelector = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSelector = fmt.Errorf("proto: integer overflow") )
var Operation_name = map[int32]string{
0: "NP",
1: "EQ",
2: "NE",
3: "GT",
4: "GE",
5: "LT",
6: "LE",
7: "OR",
8: "AND",
}
var Operation_value = map[string]int32{
"NP": 0,
"EQ": 1,
"NE": 2,
"GT": 3,
"GE": 4,
"LT": 5,
"LE": 6,
"OR": 7,
"AND": 8,
}
var Type_name = map[int32]string{
0: "String",
1: "Integer",
}
var Type_value = map[string]int32{
"String": 0,
"Integer": 1,
}
Functions ¶
func CapWeightFunc ¶ added in v1.5.2
CapWeightFunc calculates weight which is equal to capacity.
func PriceWeightFunc ¶ added in v1.6.0
PriceWeightFunc calculates weight which is equal to price.
Types ¶
type Aggregator ¶ added in v1.5.2
Aggregator can calculate some value across all netmap such as median, minimum or maximum.
func NewMaxAgg ¶ added in v1.6.1
func NewMaxAgg() Aggregator
NewMaxAgg returns an aggregator which computes max value.
func NewMeanAgg ¶ added in v1.6.0
func NewMeanAgg() Aggregator
NewMeanAgg returns an aggregator which computes mean value by recalculating it on every addition.
func NewMeanIQRAgg ¶ added in v1.6.0
func NewMeanIQRAgg() Aggregator
NewMeanIQRAgg returns an aggregator which computes mean value of values from IQR interval.
func NewMeanSumAgg ¶ added in v1.6.0
func NewMeanSumAgg() Aggregator
NewMeanSumAgg returns an aggregator which computes mean value by keeping total sum.
func NewMinAgg ¶ added in v1.6.0
func NewMinAgg() Aggregator
NewMinAgg returns an aggregator which computes min value.
type AggregatorFactory ¶ added in v1.6.0
type AggregatorFactory struct {
New func() Aggregator
}
AggregatorFactory is a Factory for a specific Aggregator
type Bucket ¶
Bucket represents netmap as graph.
func (*Bucket) AddBucket ¶
AddBucket add bucket corresponding to option o with nodes n as subbucket to b.
func (*Bucket) AddStrawNode ¶ added in v1.5.0
AddStrawNode adds straw node n with options opts to b. Straws are an analogy of weights in CRUSH algorithm paper.
func (Bucket) CheckConflicts ¶
CheckConflicts checks if b1 is ready to merge with b. Conflict is a situation, when node has different values for the same option in b and b1.
func (Bucket) DumpWithSelection ¶
DumpWithSelection dumps string representation of Bucket in *.dot format where subgraph b1 is highlighted to file name.
func (Bucket) Equals ¶
Equals checks if b and b1 represent the same Bucket (excluding contained nodes).
func (*Bucket) FindGraph ¶
FindGraph returns random subgraph, corresponding to specified placement rule.
func (*Bucket) FindNodes ¶
FindNodes returns list of nodes, corresponding to specified placement rule.
func (Bucket) GetMaxSelection ¶
GetMaxSelection returns 'maximal container' -- subgraph which contains any other subgraph satisfying specified selects and filters.
func (Bucket) GetNodesByOption ¶
GetNodesByOption returns list of nodes possessing specified options.
func (Bucket) GetSelection ¶
GetSelection returns subgraph, satisfying specified selections. It is assumed that all filters were already applied.
func (Bucket) IsValid ¶
IsValid checks if bucket is well-formed: - all nodes contained in sub-bucket must belong to this; - there must be no nodes belonging to 2 buckets.
func (Bucket) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface.
func (*Bucket) Read ¶
Read reads Bucket in serialized form: [lnName][Name][lnNodes][Node1]...[NodeN][lnSubprops][sub1]...[subN]
func (Bucket) SdumpWithSelection ¶
SdumpWithSelection returns string representation of Bucket in *.dot format where subgraph b1 is highlighted.
func (*Bucket) Traverse ¶ added in v1.5.2
func (b *Bucket) Traverse(a Aggregator, wf WeightFunc) Aggregator
Traverse adds all Bucket nodes to a and returns it's argument.
func (*Bucket) TraverseTree ¶ added in v1.6.0
func (b *Bucket) TraverseTree(af AggregatorFactory, wf WeightFunc)
TraverseTree computes weight for every Bucket and all of its children.
func (*Bucket) UnmarshalBinary ¶
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
func (*Bucket) UpdateIndices ¶
UpdateIndices is auxiliary function used to update indices of all nodes according to tr.
type Filter ¶
type Filter struct { Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` F *SimpleFilter `protobuf:"bytes,2,opt,name=F,proto3" json:"F,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Filter) Descriptor ¶
func (*Filter) GetF ¶
func (m *Filter) GetF() *SimpleFilter
func (*Filter) MarshalToSizedBuffer ¶ added in v1.5.4
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type FilterFunc ¶
FilterFunc is generic type for filtering function on nodes.
type Node ¶ added in v1.5.0
Node type represents single graph leaf with index N, capacity C and price P.
type Nodes ¶ added in v1.5.0
type Nodes []Node
Nodes represents slice of graph leafs.
type Normalizer ¶ added in v1.5.2
Normalizer normalizes weight.
func NewConstNorm ¶ added in v1.6.1
func NewConstNorm(value float64) Normalizer
NewConstNorm returns a normalizer which returns a constant values
func NewMaxNorm ¶ added in v1.6.1
func NewMaxNorm(max float64) Normalizer
NewMaxNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a maximum value.
func NewReverseMinNorm ¶ added in v1.6.1
func NewReverseMinNorm(min float64) Normalizer
NewReverseMinNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a minimum value.
func NewSigmoidNorm ¶ added in v1.6.1
func NewSigmoidNorm(scale float64) Normalizer
NewSigmoidNorm returns a normalizer which normalize values in range of 0.0 to 1.0 to a scaled sigmoid.
type PlacementRule ¶
type PlacementRule struct { ReplFactor uint32 `protobuf:"varint,1,opt,name=ReplFactor,proto3" json:"ReplFactor,omitempty"` SFGroups []SFGroup `protobuf:"bytes,2,rep,name=SFGroups,proto3" json:"SFGroups"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PlacementRule) Descriptor ¶
func (*PlacementRule) Descriptor() ([]byte, []int)
func (*PlacementRule) GetReplFactor ¶
func (m *PlacementRule) GetReplFactor() uint32
func (*PlacementRule) GetSFGroups ¶
func (m *PlacementRule) GetSFGroups() []SFGroup
func (*PlacementRule) Marshal ¶
func (m *PlacementRule) Marshal() (dAtA []byte, err error)
func (*PlacementRule) MarshalToSizedBuffer ¶ added in v1.5.4
func (m *PlacementRule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PlacementRule) ProtoMessage ¶
func (*PlacementRule) ProtoMessage()
func (*PlacementRule) Reset ¶
func (m *PlacementRule) Reset()
func (*PlacementRule) Size ¶
func (m *PlacementRule) Size() (n int)
func (*PlacementRule) String ¶
func (m *PlacementRule) String() string
func (*PlacementRule) Unmarshal ¶
func (m *PlacementRule) Unmarshal(dAtA []byte) error
func (*PlacementRule) XXX_DiscardUnknown ¶
func (m *PlacementRule) XXX_DiscardUnknown()
func (*PlacementRule) XXX_Marshal ¶
func (m *PlacementRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlacementRule) XXX_Merge ¶
func (m *PlacementRule) XXX_Merge(src proto.Message)
func (*PlacementRule) XXX_Size ¶
func (m *PlacementRule) XXX_Size() int
func (*PlacementRule) XXX_Unmarshal ¶
func (m *PlacementRule) XXX_Unmarshal(b []byte) error
type SFGroup ¶
type SFGroup struct { Filters []Filter `protobuf:"bytes,1,rep,name=Filters,proto3" json:"Filters"` Selectors []Select `protobuf:"bytes,2,rep,name=Selectors,proto3" json:"Selectors"` Exclude []uint32 `protobuf:"varint,3,rep,packed,name=Exclude,proto3" json:"Exclude,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SFGroup) Descriptor ¶
func (*SFGroup) GetExclude ¶ added in v1.4.0
func (*SFGroup) GetFilters ¶
func (*SFGroup) GetSelectors ¶
func (*SFGroup) MarshalToSizedBuffer ¶ added in v1.5.4
func (*SFGroup) ProtoMessage ¶
func (*SFGroup) ProtoMessage()
func (*SFGroup) XXX_DiscardUnknown ¶
func (m *SFGroup) XXX_DiscardUnknown()
func (*SFGroup) XXX_Marshal ¶
func (*SFGroup) XXX_Unmarshal ¶
type Select ¶
type Select struct { Count uint32 `protobuf:"varint,1,opt,name=Count,proto3" json:"Count,omitempty"` Key string `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Select) Descriptor ¶
func (*Select) MarshalToSizedBuffer ¶ added in v1.5.4
func (*Select) ProtoMessage ¶
func (*Select) ProtoMessage()
func (*Select) XXX_DiscardUnknown ¶
func (m *Select) XXX_DiscardUnknown()
func (*Select) XXX_Marshal ¶
func (*Select) XXX_Unmarshal ¶
type SimpleFilter ¶
type SimpleFilter struct { Op Operation `protobuf:"varint,1,opt,name=Op,proto3,enum=netmap.Operation" json:"Op,omitempty"` // Types that are valid to be assigned to Args: // *SimpleFilter_Value // *SimpleFilter_FArgs Args isSimpleFilter_Args `protobuf_oneof:"Args"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func FilterAND ¶
func FilterAND(fs ...*SimpleFilter) *SimpleFilter
FilterAND returns AND combination of filters.
func FilterEQ ¶
func FilterEQ(v string) *SimpleFilter
FilterEQ returns filter, which checks if value is equal to v.
func FilterGE ¶
func FilterGE(v int64) *SimpleFilter
FilterGE returns filter, which checks if value is greater or equal than v.
func FilterGT ¶
func FilterGT(v int64) *SimpleFilter
FilterGT returns filter, which checks if value is greater than v.
func FilterIn ¶
func FilterIn(values ...string) *SimpleFilter
FilterIn returns filter, which checks if value is in specified list.
func FilterLE ¶
func FilterLE(v int64) *SimpleFilter
FilterLE returns filter, which checks if value is less or equal than v.
func FilterLT ¶
func FilterLT(v int64) *SimpleFilter
FilterLT returns filter, which checks if value is less than v.
func FilterNE ¶
func FilterNE(v string) *SimpleFilter
FilterNE returns filter, which checks if value is not equal to v.
func FilterNotIn ¶
func FilterNotIn(values ...string) *SimpleFilter
FilterNotIn returns filter, which checks if value is not in specified list.
func FilterOR ¶
func FilterOR(fs ...*SimpleFilter) *SimpleFilter
FilterOR returns OR combination of filters.
func NewFilter ¶
func NewFilter(op Operation, value string) *SimpleFilter
NewFilter constructs SimpleFilter.
func (SimpleFilter) Check ¶
func (sf SimpleFilter) Check(value string) bool
Check returns result of applying sf to value. For numeric comparisons, value is parsed to int64.
func (*SimpleFilter) Descriptor ¶
func (*SimpleFilter) Descriptor() ([]byte, []int)
func (*SimpleFilter) GetArgs ¶
func (m *SimpleFilter) GetArgs() isSimpleFilter_Args
func (*SimpleFilter) GetFArgs ¶
func (m *SimpleFilter) GetFArgs() *SimpleFilters
func (*SimpleFilter) GetOp ¶
func (m *SimpleFilter) GetOp() Operation
func (*SimpleFilter) GetValue ¶
func (m *SimpleFilter) GetValue() string
func (*SimpleFilter) Marshal ¶
func (m *SimpleFilter) Marshal() (dAtA []byte, err error)
func (*SimpleFilter) MarshalToSizedBuffer ¶ added in v1.5.4
func (m *SimpleFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimpleFilter) ProtoMessage ¶
func (*SimpleFilter) ProtoMessage()
func (*SimpleFilter) Reset ¶
func (m *SimpleFilter) Reset()
func (*SimpleFilter) Size ¶
func (m *SimpleFilter) Size() (n int)
func (*SimpleFilter) String ¶
func (m *SimpleFilter) String() string
func (*SimpleFilter) Unmarshal ¶
func (m *SimpleFilter) Unmarshal(dAtA []byte) error
func (*SimpleFilter) XXX_DiscardUnknown ¶
func (m *SimpleFilter) XXX_DiscardUnknown()
func (*SimpleFilter) XXX_Marshal ¶
func (m *SimpleFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimpleFilter) XXX_Merge ¶
func (m *SimpleFilter) XXX_Merge(src proto.Message)
func (*SimpleFilter) XXX_OneofWrappers ¶ added in v1.5.4
func (*SimpleFilter) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*SimpleFilter) XXX_Size ¶
func (m *SimpleFilter) XXX_Size() int
func (*SimpleFilter) XXX_Unmarshal ¶
func (m *SimpleFilter) XXX_Unmarshal(b []byte) error
type SimpleFilter_FArgs ¶
type SimpleFilter_FArgs struct {
FArgs *SimpleFilters `protobuf:"bytes,3,opt,name=FArgs,proto3,oneof" json:"FArgs,omitempty"`
}
func (*SimpleFilter_FArgs) MarshalTo ¶
func (m *SimpleFilter_FArgs) MarshalTo(dAtA []byte) (int, error)
func (*SimpleFilter_FArgs) MarshalToSizedBuffer ¶ added in v1.5.4
func (m *SimpleFilter_FArgs) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimpleFilter_FArgs) Size ¶
func (m *SimpleFilter_FArgs) Size() (n int)
type SimpleFilter_Value ¶
type SimpleFilter_Value struct {
Value string `protobuf:"bytes,2,opt,name=Value,proto3,oneof" json:"Value,omitempty"`
}
func (*SimpleFilter_Value) MarshalTo ¶
func (m *SimpleFilter_Value) MarshalTo(dAtA []byte) (int, error)
func (*SimpleFilter_Value) MarshalToSizedBuffer ¶ added in v1.5.4
func (m *SimpleFilter_Value) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimpleFilter_Value) Size ¶
func (m *SimpleFilter_Value) Size() (n int)
type SimpleFilters ¶
type SimpleFilters struct { Filters []SimpleFilter `protobuf:"bytes,1,rep,name=Filters,proto3" json:"Filters"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SimpleFilters) Descriptor ¶
func (*SimpleFilters) Descriptor() ([]byte, []int)
func (*SimpleFilters) GetFilters ¶
func (m *SimpleFilters) GetFilters() []SimpleFilter
func (*SimpleFilters) Marshal ¶
func (m *SimpleFilters) Marshal() (dAtA []byte, err error)
func (*SimpleFilters) MarshalToSizedBuffer ¶ added in v1.5.4
func (m *SimpleFilters) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimpleFilters) ProtoMessage ¶
func (*SimpleFilters) ProtoMessage()
func (*SimpleFilters) Reset ¶
func (m *SimpleFilters) Reset()
func (*SimpleFilters) Size ¶
func (m *SimpleFilters) Size() (n int)
func (*SimpleFilters) String ¶
func (m *SimpleFilters) String() string
func (*SimpleFilters) Unmarshal ¶
func (m *SimpleFilters) Unmarshal(dAtA []byte) error
func (*SimpleFilters) XXX_DiscardUnknown ¶
func (m *SimpleFilters) XXX_DiscardUnknown()
func (*SimpleFilters) XXX_Marshal ¶
func (m *SimpleFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimpleFilters) XXX_Merge ¶
func (m *SimpleFilters) XXX_Merge(src proto.Message)
func (*SimpleFilters) XXX_Size ¶
func (m *SimpleFilters) XXX_Size() int
func (*SimpleFilters) XXX_Unmarshal ¶
func (m *SimpleFilters) XXX_Unmarshal(b []byte) error
type WeightFunc ¶ added in v1.5.2
WeightFunc calculates n's weight.
func NewWeightFunc ¶ added in v1.5.2
func NewWeightFunc(capNorm, priceNorm Normalizer) WeightFunc
NewWeightFunc returns WeightFunc which multiplies normalized capacity and price. TODO generic solution for arbitrary number of weights