policy

package
v3.11.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 */
}

func (*Config) Descriptor

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

func (*Config) GetLevel

func (m *Config) GetLevel() map[uint32]*Policy

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

Instance is an instance of Policy manager.

func New

func New(ctx context.Context, config *Config) (*Instance, error)

New creates new Policy manager instance.

func (*Instance) Close

func (m *Instance) Close() error

Close implements app.Application.Close().

func (*Instance) ForLevel

func (m *Instance) ForLevel(level uint32) core.Policy

ForLevel implements core.PolicyManager.

func (*Instance) Start

func (m *Instance) Start() error

Start implements app.Application.Start().

type Policy

type Policy struct {
	Timeout *Policy_Timeout `protobuf:"bytes,1,opt,name=timeout" json:"timeout,omitempty"`
}

func (*Policy) Descriptor

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

func (*Policy) GetTimeout

func (m *Policy) GetTimeout() *Policy_Timeout

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) Reset

func (m *Policy) Reset()

func (*Policy) String

func (m *Policy) String() string

func (*Policy) ToCorePolicy

func (p *Policy) ToCorePolicy() core.Policy

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) Descriptor

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

func (*Second) Duration

func (s *Second) Duration() time.Duration

Duration converts Second to time.Duration.

func (*Second) GetValue

func (m *Second) GetValue() uint32

func (*Second) ProtoMessage

func (*Second) ProtoMessage()

func (*Second) Reset

func (m *Second) Reset()

func (*Second) String

func (m *Second) String() string

Jump to

Keyboard shortcuts

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