Documentation ¶
Index ¶
- type Config
- type Instance
- type Policy
- type Policy_Stats
- 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
- type Second
- type SystemPolicy
- type SystemPolicy_Stats
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 `` /* 131-byte string literal not displayed */ System *SystemPolicy `protobuf:"bytes,2,opt,name=system" json:"system,omitempty"` }
func (*Config) GetSystem ¶
func (m *Config) GetSystem() *SystemPolicy
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance is an instance of Policy manager.
func New ¶
New creates new Policy manager instance.
func (*Instance) ForLevel ¶
ForLevel implements core.PolicyManager.
func (*Instance) ForSystem ¶
func (m *Instance) ForSystem() core.SystemPolicy
type Policy ¶
type Policy struct { Timeout *Policy_Timeout `protobuf:"bytes,1,opt,name=timeout" json:"timeout,omitempty"` Stats *Policy_Stats `protobuf:"bytes,2,opt,name=stats" json:"stats,omitempty"` }
func (*Policy) GetStats ¶
func (m *Policy) GetStats() *Policy_Stats
func (*Policy) GetTimeout ¶
func (m *Policy) GetTimeout() *Policy_Timeout
type Policy_Stats ¶
type Policy_Stats struct { UserUplink bool `protobuf:"varint,1,opt,name=user_uplink,json=userUplink" json:"user_uplink,omitempty"` UserDownlink bool `protobuf:"varint,2,opt,name=user_downlink,json=userDownlink" json:"user_downlink,omitempty"` }
func (*Policy_Stats) Descriptor ¶
func (*Policy_Stats) Descriptor() ([]byte, []int)
func (*Policy_Stats) GetUserDownlink ¶
func (m *Policy_Stats) GetUserDownlink() bool
func (*Policy_Stats) GetUserUplink ¶
func (m *Policy_Stats) GetUserUplink() bool
func (*Policy_Stats) ProtoMessage ¶
func (*Policy_Stats) ProtoMessage()
func (*Policy_Stats) Reset ¶
func (m *Policy_Stats) Reset()
func (*Policy_Stats) String ¶
func (m *Policy_Stats) String() string
type Policy_Timeout ¶
type Policy_Timeout struct { Handshake *Second `protobuf:"bytes,1,opt,name=handshake" json:"handshake,omitempty"` ConnectionIdle *Second `protobuf:"bytes,2,opt,name=connection_idle,json=connectionIdle" json:"connection_idle,omitempty"` UplinkOnly *Second `protobuf:"bytes,3,opt,name=uplink_only,json=uplinkOnly" json:"uplink_only,omitempty"` DownlinkOnly *Second `protobuf:"bytes,4,opt,name=downlink_only,json=downlinkOnly" json:"downlink_only,omitempty"` }
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
type Second ¶
type Second struct {
Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}
func (*Second) Duration ¶
Duration converts Second to time.Duration.
type SystemPolicy ¶
type SystemPolicy struct {
Stats *SystemPolicy_Stats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
}
func (*SystemPolicy) Descriptor ¶
func (*SystemPolicy) Descriptor() ([]byte, []int)
func (*SystemPolicy) GetStats ¶
func (m *SystemPolicy) GetStats() *SystemPolicy_Stats
func (*SystemPolicy) ProtoMessage ¶
func (*SystemPolicy) ProtoMessage()
func (*SystemPolicy) Reset ¶
func (m *SystemPolicy) Reset()
func (*SystemPolicy) String ¶
func (m *SystemPolicy) String() string
func (*SystemPolicy) ToCorePolicy ¶
func (p *SystemPolicy) ToCorePolicy() core.SystemPolicy
type SystemPolicy_Stats ¶
type SystemPolicy_Stats struct { InboundUplink bool `protobuf:"varint,1,opt,name=inbound_uplink,json=inboundUplink" json:"inbound_uplink,omitempty"` InboundDownlink bool `protobuf:"varint,2,opt,name=inbound_downlink,json=inboundDownlink" json:"inbound_downlink,omitempty"` }
func (*SystemPolicy_Stats) Descriptor ¶
func (*SystemPolicy_Stats) Descriptor() ([]byte, []int)
func (*SystemPolicy_Stats) GetInboundDownlink ¶
func (m *SystemPolicy_Stats) GetInboundDownlink() bool
func (*SystemPolicy_Stats) GetInboundUplink ¶
func (m *SystemPolicy_Stats) GetInboundUplink() bool
func (*SystemPolicy_Stats) ProtoMessage ¶
func (*SystemPolicy_Stats) ProtoMessage()
func (*SystemPolicy_Stats) Reset ¶
func (m *SystemPolicy_Stats) Reset()
func (*SystemPolicy_Stats) String ¶
func (m *SystemPolicy_Stats) String() string
Click to show internal directories.
Click to hide internal directories.