Documentation ¶
Index ¶
- Constants
- type Action
- type Condition
- type GlobalConfig
- type IRule
- type InternalDataGroup
- type InternalDataGroupRecord
- type Member
- type Monitor
- type NameRef
- type PartitionMap
- type Policies
- type Policy
- type Pool
- type ProfileRef
- type Resources
- type RouteMap
- type Rule
- type RuleMap
- type Rules
- type SourceAddrTranslation
- type Virtual
- type VirtualAddress
Constants ¶
const ( // JSESSIONIDiRuleName on BIG-IP JsessionidIRuleName = "jsessionid-persistence" // JSESSIONID iRule on the BIG-IP JsessionidIRule = `` /* 1177-byte string literal not displayed */ )
const ( // HTTPForwardingiRuleName on BIG-IP HTTPForwardingiRuleName = "forward-to-vip" // ForwardToVIPiRule irule used to forward to the tier2 vips ForwardToVIPiRule = `` /* 253-byte string literal not displayed */ )
ForwardToVIPiRule forwards traffic from a tier1 vip to a tier2
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Forward bool `json:"forward,omitempty"` Name string `json:"name"` Pool string `json:"pool,omitempty"` Request bool `json:"request"` Expression string `json:"expression,omitempty"` TmName string `json:"tmName,omitempty"` Tcl bool `json:"tcl,omitempty"` SetVariable bool `json:"setVariable,omitempty"` }
Action for a rule
type Condition ¶
type Condition struct { Equals bool `json:"equals,omitempty"` StartsWith bool `json:"startsWith,omitempty"` EndsWith bool `json:"endsWith,omitempty"` Host bool `json:"host,omitempty"` HTTPHost bool `json:"httpHost,omitempty"` HTTPURI bool `json:"httpUri,omitempty"` PathSegment bool `json:"pathSegment,omitempty"` Name string `json:"name"` Index int `json:"index"` Request bool `json:"request"` Values []string `json:"values"` }
Condition for a rule
type GlobalConfig ¶
type GlobalConfig struct { LogLevel string `json:"log-level"` VerifyInterval int `json:"verify-interval"` }
GlobalConfig for logging and checking the bigip
type InternalDataGroup ¶ added in v1.1.0
type InternalDataGroup struct { Name string `json:"name"` Records []*InternalDataGroupRecord `json:"records"` }
InternalDataGroup holds our records
func NewInternalDataGroup ¶ added in v1.1.0
func NewInternalDataGroup(name string) *InternalDataGroup
NewInternalDataGroup returns a new internal data group
func (*InternalDataGroup) AddRecord ¶ added in v1.1.0
func (idg *InternalDataGroup) AddRecord(name string, data string)
AddRecord to the data group
func (*InternalDataGroup) RemoveRecord ¶ added in v1.1.0
func (idg *InternalDataGroup) RemoveRecord(name string)
RemoveRecord from the data group
func (*InternalDataGroup) ReturnRecord ¶ added in v1.1.0
func (idg *InternalDataGroup) ReturnRecord(name string) (*InternalDataGroupRecord, bool)
ReturnRecord and true or nil and false if it does not exist
type InternalDataGroupRecord ¶ added in v1.1.0
InternalDataGroupRecord holds the name and data for a record
func (*InternalDataGroupRecord) ReturnRouteURIAndPlanName ¶ added in v1.1.0
func (idgr *InternalDataGroupRecord) ReturnRouteURIAndPlanName() (string, string, error)
ReturnRouteURIAndPlanName retuens the data record as a route URI and plan ID
func (*InternalDataGroupRecord) ReturnTier2VirtualAddress ¶ added in v1.1.0
func (idgr *InternalDataGroupRecord) ReturnTier2VirtualAddress() (*VirtualAddress, error)
ReturnTier2VirtualAddress returns the Data of a record as a VirtualAddress
type Member ¶
type Member struct { Address string `json:"address"` Port uint16 `json:"port"` Session string `json:"session,omitempty"` }
Pool Member
type Monitor ¶
type Monitor struct { Name string `json:"name"` Interval int `json:"interval,omitempty"` Type string `json:"type"` Send string `json:"send,omitempty"` Recv string `json:"recv,omitempty"` Timeout int `json:"timeout,omitempty"` }
backend health monitor
type Policy ¶
type Policy struct { Controls []string `json:"controls"` Description string `json:"description,omitempty"` Legacy bool `json:"legacy"` Name string `json:"name"` Requires []string `json:"requires"` Rules []*Rule `json:"rules"` Strategy string `json:"strategy"` }
Policy is the final object for the BIG-IP
type Pool ¶
type Pool struct { Name string `json:"name"` Balance string `json:"loadBalancingMode"` Members []Member `json:"members"` MonitorNames []string `json:"monitors"` Description string `json:"description"` }
Pool backend
type ProfileRef ¶ added in v1.1.0
type ProfileRef struct { Name string `json:"name"` Partition string `json:"partition"` Context string `json:"context"` // 'clientside', 'serverside', or 'all' }
ProfileRef references to pre-existing profiles
type Resources ¶
type Resources struct { Virtuals []*Virtual `json:"virtualServers,omitempty"` Pools []*Pool `json:"pools,omitempty"` Monitors []*Monitor `json:"monitors,omitempty"` Policies []*Policy `json:"l7Policies,omitempty"` IRules []*IRule `json:"iRules,omitempty"` InternalDataGroups []*InternalDataGroup `json:"internalDataGroups,omitempty"` }
Resources is what gets written to and dumped out for the python side
type Rule ¶
type Rule struct { FullURI string `json:"-"` Actions []*Action `json:"actions"` Conditions []*Condition `json:"conditions"` Name string `json:"name"` Ordinal int `json:"ordinal"` Description string `json:"description"` }
Rule builds up a Policy
type SourceAddrTranslation ¶
type SourceAddrTranslation struct {
Type string `json:"type"`
}
SourceAddrTranslation is the Virtual Server Source Address Translation
type Virtual ¶
type Virtual struct { VirtualServerName string `json:"name"` PoolName string `json:"pool,omitempty"` Mode string `json:"ipProtocol,omitempty"` Enabled bool `json:"enabled,omitempty"` Destination string `json:"destination,omitempty"` SourceAddress string `json:"source,omitempty"` Policies []*NameRef `json:"policies,omitempty"` Profiles []*ProfileRef `json:"profiles,omitempty"` IRules []string `json:"rules,omitempty"` SourceAddrTranslation SourceAddrTranslation `json:"sourceAddressTranslation,omitempty"` }
Virtual server frontend
type VirtualAddress ¶
type VirtualAddress struct { BindAddr string `json:"bindAddr,omitempty"` Port int32 `json:"port,omitempty"` }
VirtualAddress is frontend bindaddr and port
func (VirtualAddress) Encode ¶ added in v1.1.0
func (va VirtualAddress) Encode() (string, error)
Encode returns an encoded string of a VirtualAddress
func (VirtualAddress) String ¶ added in v1.1.0
func (va VirtualAddress) String() string