Documentation ¶
Overview ¶
Package policy is an implementation of core.PolicyManager feature.
Index ¶
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetLevel() map[uint32]*Policy
- func (m *Config) GetSystem() *SystemPolicy
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Instance
- type Policy
- func (*Policy) Descriptor() ([]byte, []int)
- func (m *Policy) GetBuffer() *Policy_Buffer
- func (m *Policy) GetStats() *Policy_Stats
- func (m *Policy) GetTimeout() *Policy_Timeout
- func (*Policy) ProtoMessage()
- func (m *Policy) Reset()
- func (m *Policy) String() string
- func (p *Policy) ToCorePolicy() core.Policy
- func (m *Policy) XXX_DiscardUnknown()
- func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Policy) XXX_Merge(src proto.Message)
- func (m *Policy) XXX_Size() int
- func (m *Policy) XXX_Unmarshal(b []byte) error
- type Policy_Buffer
- func (*Policy_Buffer) Descriptor() ([]byte, []int)
- func (m *Policy_Buffer) GetConnection() int32
- func (*Policy_Buffer) ProtoMessage()
- func (m *Policy_Buffer) Reset()
- func (m *Policy_Buffer) String() string
- func (m *Policy_Buffer) XXX_DiscardUnknown()
- func (m *Policy_Buffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Policy_Buffer) XXX_Merge(src proto.Message)
- func (m *Policy_Buffer) XXX_Size() int
- func (m *Policy_Buffer) XXX_Unmarshal(b []byte) error
- type Policy_Stats
- func (*Policy_Stats) Descriptor() ([]byte, []int)
- func (m *Policy_Stats) GetUserDownlink() bool
- func (m *Policy_Stats) GetUserUplink() bool
- func (*Policy_Stats) ProtoMessage()
- func (m *Policy_Stats) Reset()
- func (m *Policy_Stats) String() string
- func (m *Policy_Stats) XXX_DiscardUnknown()
- func (m *Policy_Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Policy_Stats) XXX_Merge(src proto.Message)
- func (m *Policy_Stats) XXX_Size() int
- func (m *Policy_Stats) XXX_Unmarshal(b []byte) error
- type Policy_Timeout
- func (*Policy_Timeout) Descriptor() ([]byte, []int)
- func (m *Policy_Timeout) GetConnectionIdle() *Second
- func (m *Policy_Timeout) GetDownlinkOnly() *Second
- func (m *Policy_Timeout) GetHandshake() *Second
- func (m *Policy_Timeout) GetUplinkOnly() *Second
- func (*Policy_Timeout) ProtoMessage()
- func (m *Policy_Timeout) Reset()
- func (m *Policy_Timeout) String() string
- func (m *Policy_Timeout) XXX_DiscardUnknown()
- func (m *Policy_Timeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Policy_Timeout) XXX_Merge(src proto.Message)
- func (m *Policy_Timeout) XXX_Size() int
- func (m *Policy_Timeout) XXX_Unmarshal(b []byte) error
- type Second
- func (*Second) Descriptor() ([]byte, []int)
- func (s *Second) Duration() time.Duration
- func (m *Second) GetValue() uint32
- func (*Second) ProtoMessage()
- func (m *Second) Reset()
- func (m *Second) String() string
- func (m *Second) XXX_DiscardUnknown()
- func (m *Second) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Second) XXX_Merge(src proto.Message)
- func (m *Second) XXX_Size() int
- func (m *Second) XXX_Unmarshal(b []byte) error
- type SystemPolicy
- func (*SystemPolicy) Descriptor() ([]byte, []int)
- func (m *SystemPolicy) GetStats() *SystemPolicy_Stats
- func (*SystemPolicy) ProtoMessage()
- func (m *SystemPolicy) Reset()
- func (m *SystemPolicy) String() string
- func (p *SystemPolicy) ToCorePolicy() core.SystemPolicy
- func (m *SystemPolicy) XXX_DiscardUnknown()
- func (m *SystemPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SystemPolicy) XXX_Merge(src proto.Message)
- func (m *SystemPolicy) XXX_Size() int
- func (m *SystemPolicy) XXX_Unmarshal(b []byte) error
- type SystemPolicy_Stats
- func (*SystemPolicy_Stats) Descriptor() ([]byte, []int)
- func (m *SystemPolicy_Stats) GetInboundDownlink() bool
- func (m *SystemPolicy_Stats) GetInboundUplink() bool
- func (*SystemPolicy_Stats) ProtoMessage()
- func (m *SystemPolicy_Stats) Reset()
- func (m *SystemPolicy_Stats) String() string
- func (m *SystemPolicy_Stats) XXX_DiscardUnknown()
- func (m *SystemPolicy_Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SystemPolicy_Stats) XXX_Merge(src proto.Message)
- func (m *SystemPolicy_Stats) XXX_Size() int
- func (m *SystemPolicy_Stats) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level map[uint32]*Policy `` /* 152-byte string literal not displayed */ System *SystemPolicy `protobuf:"bytes,2,opt,name=system,proto3" json:"system,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) GetSystem ¶ added in v3.17.1
func (m *Config) GetSystem() *SystemPolicy
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶ added in v3.23.1
func (*Config) XXX_Unmarshal ¶ added in v3.23.1
type Instance ¶ added in v3.8.1
type Instance struct {
// contains filtered or unexported fields
}
Instance is an instance of Policy manager.
func (*Instance) ForSystem ¶ added in v3.17.1
func (m *Instance) ForSystem() core.SystemPolicy
ForSystem implements core.PolicyManager.
type Policy ¶
type Policy struct { Timeout *Policy_Timeout `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"` Stats *Policy_Stats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"` Buffer *Policy_Buffer `protobuf:"bytes,3,opt,name=buffer,proto3" json:"buffer,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Policy) Descriptor ¶
func (*Policy) GetBuffer ¶ added in v3.23.1
func (m *Policy) GetBuffer() *Policy_Buffer
func (*Policy) GetStats ¶ added in v3.17.1
func (m *Policy) GetStats() *Policy_Stats
func (*Policy) GetTimeout ¶
func (m *Policy) GetTimeout() *Policy_Timeout
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
func (*Policy) ToCorePolicy ¶ added in v3.8.1
ToCorePolicy converts this Policy to core.Policy.
func (*Policy) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Policy) XXX_DiscardUnknown()
func (*Policy) XXX_Marshal ¶ added in v3.23.1
func (*Policy) XXX_Unmarshal ¶ added in v3.23.1
type Policy_Buffer ¶ added in v3.23.1
type Policy_Buffer struct { // Buffer size per connection, in bytes. -1 for unlimited buffer. Connection int32 `protobuf:"varint,1,opt,name=connection,proto3" json:"connection,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Policy_Buffer) Descriptor ¶ added in v3.23.1
func (*Policy_Buffer) Descriptor() ([]byte, []int)
func (*Policy_Buffer) GetConnection ¶ added in v3.23.1
func (m *Policy_Buffer) GetConnection() int32
func (*Policy_Buffer) ProtoMessage ¶ added in v3.23.1
func (*Policy_Buffer) ProtoMessage()
func (*Policy_Buffer) Reset ¶ added in v3.23.1
func (m *Policy_Buffer) Reset()
func (*Policy_Buffer) String ¶ added in v3.23.1
func (m *Policy_Buffer) String() string
func (*Policy_Buffer) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Policy_Buffer) XXX_DiscardUnknown()
func (*Policy_Buffer) XXX_Marshal ¶ added in v3.23.1
func (m *Policy_Buffer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Policy_Buffer) XXX_Merge ¶ added in v3.23.1
func (m *Policy_Buffer) XXX_Merge(src proto.Message)
func (*Policy_Buffer) XXX_Size ¶ added in v3.23.1
func (m *Policy_Buffer) XXX_Size() int
func (*Policy_Buffer) XXX_Unmarshal ¶ added in v3.23.1
func (m *Policy_Buffer) XXX_Unmarshal(b []byte) error
type Policy_Stats ¶ added in v3.17.1
type Policy_Stats struct { UserUplink bool `protobuf:"varint,1,opt,name=user_uplink,json=userUplink,proto3" json:"user_uplink,omitempty"` UserDownlink bool `protobuf:"varint,2,opt,name=user_downlink,json=userDownlink,proto3" json:"user_downlink,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Policy_Stats) Descriptor ¶ added in v3.17.1
func (*Policy_Stats) Descriptor() ([]byte, []int)
func (*Policy_Stats) GetUserDownlink ¶ added in v3.17.1
func (m *Policy_Stats) GetUserDownlink() bool
func (*Policy_Stats) GetUserUplink ¶ added in v3.17.1
func (m *Policy_Stats) GetUserUplink() bool
func (*Policy_Stats) ProtoMessage ¶ added in v3.17.1
func (*Policy_Stats) ProtoMessage()
func (*Policy_Stats) Reset ¶ added in v3.17.1
func (m *Policy_Stats) Reset()
func (*Policy_Stats) String ¶ added in v3.17.1
func (m *Policy_Stats) String() string
func (*Policy_Stats) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Policy_Stats) XXX_DiscardUnknown()
func (*Policy_Stats) XXX_Marshal ¶ added in v3.23.1
func (m *Policy_Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Policy_Stats) XXX_Merge ¶ added in v3.23.1
func (m *Policy_Stats) XXX_Merge(src proto.Message)
func (*Policy_Stats) XXX_Size ¶ added in v3.23.1
func (m *Policy_Stats) XXX_Size() int
func (*Policy_Stats) XXX_Unmarshal ¶ added in v3.23.1
func (m *Policy_Stats) XXX_Unmarshal(b []byte) error
type Policy_Timeout ¶
type Policy_Timeout struct { Handshake *Second `protobuf:"bytes,1,opt,name=handshake,proto3" json:"handshake,omitempty"` ConnectionIdle *Second `protobuf:"bytes,2,opt,name=connection_idle,json=connectionIdle,proto3" json:"connection_idle,omitempty"` UplinkOnly *Second `protobuf:"bytes,3,opt,name=uplink_only,json=uplinkOnly,proto3" json:"uplink_only,omitempty"` DownlinkOnly *Second `protobuf:"bytes,4,opt,name=downlink_only,json=downlinkOnly,proto3" json:"downlink_only,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Timeout is a message for timeout settings in various stages, in seconds.
func (*Policy_Timeout) Descriptor ¶
func (*Policy_Timeout) Descriptor() ([]byte, []int)
func (*Policy_Timeout) GetConnectionIdle ¶
func (m *Policy_Timeout) GetConnectionIdle() *Second
func (*Policy_Timeout) GetDownlinkOnly ¶
func (m *Policy_Timeout) GetDownlinkOnly() *Second
func (*Policy_Timeout) GetHandshake ¶
func (m *Policy_Timeout) GetHandshake() *Second
func (*Policy_Timeout) GetUplinkOnly ¶
func (m *Policy_Timeout) GetUplinkOnly() *Second
func (*Policy_Timeout) ProtoMessage ¶
func (*Policy_Timeout) ProtoMessage()
func (*Policy_Timeout) Reset ¶
func (m *Policy_Timeout) Reset()
func (*Policy_Timeout) String ¶
func (m *Policy_Timeout) String() string
func (*Policy_Timeout) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Policy_Timeout) XXX_DiscardUnknown()
func (*Policy_Timeout) XXX_Marshal ¶ added in v3.23.1
func (m *Policy_Timeout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Policy_Timeout) XXX_Merge ¶ added in v3.23.1
func (m *Policy_Timeout) XXX_Merge(src proto.Message)
func (*Policy_Timeout) XXX_Size ¶ added in v3.23.1
func (m *Policy_Timeout) XXX_Size() int
func (*Policy_Timeout) XXX_Unmarshal ¶ added in v3.23.1
func (m *Policy_Timeout) XXX_Unmarshal(b []byte) error
type Second ¶
type Second struct { Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Second) Descriptor ¶
func (*Second) ProtoMessage ¶
func (*Second) ProtoMessage()
func (*Second) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *Second) XXX_DiscardUnknown()
func (*Second) XXX_Marshal ¶ added in v3.23.1
func (*Second) XXX_Unmarshal ¶ added in v3.23.1
type SystemPolicy ¶ added in v3.17.1
type SystemPolicy struct { Stats *SystemPolicy_Stats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SystemPolicy) Descriptor ¶ added in v3.17.1
func (*SystemPolicy) Descriptor() ([]byte, []int)
func (*SystemPolicy) GetStats ¶ added in v3.17.1
func (m *SystemPolicy) GetStats() *SystemPolicy_Stats
func (*SystemPolicy) ProtoMessage ¶ added in v3.17.1
func (*SystemPolicy) ProtoMessage()
func (*SystemPolicy) Reset ¶ added in v3.17.1
func (m *SystemPolicy) Reset()
func (*SystemPolicy) String ¶ added in v3.17.1
func (m *SystemPolicy) String() string
func (*SystemPolicy) ToCorePolicy ¶ added in v3.17.1
func (p *SystemPolicy) ToCorePolicy() core.SystemPolicy
ToCorePolicy converts this SystemPolicy to core.SystemPolicy.
func (*SystemPolicy) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *SystemPolicy) XXX_DiscardUnknown()
func (*SystemPolicy) XXX_Marshal ¶ added in v3.23.1
func (m *SystemPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SystemPolicy) XXX_Merge ¶ added in v3.23.1
func (m *SystemPolicy) XXX_Merge(src proto.Message)
func (*SystemPolicy) XXX_Size ¶ added in v3.23.1
func (m *SystemPolicy) XXX_Size() int
func (*SystemPolicy) XXX_Unmarshal ¶ added in v3.23.1
func (m *SystemPolicy) XXX_Unmarshal(b []byte) error
type SystemPolicy_Stats ¶ added in v3.17.1
type SystemPolicy_Stats struct { InboundUplink bool `protobuf:"varint,1,opt,name=inbound_uplink,json=inboundUplink,proto3" json:"inbound_uplink,omitempty"` InboundDownlink bool `protobuf:"varint,2,opt,name=inbound_downlink,json=inboundDownlink,proto3" json:"inbound_downlink,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SystemPolicy_Stats) Descriptor ¶ added in v3.17.1
func (*SystemPolicy_Stats) Descriptor() ([]byte, []int)
func (*SystemPolicy_Stats) GetInboundDownlink ¶ added in v3.17.1
func (m *SystemPolicy_Stats) GetInboundDownlink() bool
func (*SystemPolicy_Stats) GetInboundUplink ¶ added in v3.17.1
func (m *SystemPolicy_Stats) GetInboundUplink() bool
func (*SystemPolicy_Stats) ProtoMessage ¶ added in v3.17.1
func (*SystemPolicy_Stats) ProtoMessage()
func (*SystemPolicy_Stats) Reset ¶ added in v3.17.1
func (m *SystemPolicy_Stats) Reset()
func (*SystemPolicy_Stats) String ¶ added in v3.17.1
func (m *SystemPolicy_Stats) String() string
func (*SystemPolicy_Stats) XXX_DiscardUnknown ¶ added in v3.23.1
func (m *SystemPolicy_Stats) XXX_DiscardUnknown()
func (*SystemPolicy_Stats) XXX_Marshal ¶ added in v3.23.1
func (m *SystemPolicy_Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SystemPolicy_Stats) XXX_Merge ¶ added in v3.23.1
func (m *SystemPolicy_Stats) XXX_Merge(src proto.Message)
func (*SystemPolicy_Stats) XXX_Size ¶ added in v3.23.1
func (m *SystemPolicy_Stats) XXX_Size() int
func (*SystemPolicy_Stats) XXX_Unmarshal ¶ added in v3.23.1
func (m *SystemPolicy_Stats) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.