gophercloud: github.com/rackspace/gophercloud/rackspace/lb/v1/sessions Index | Files

package sessions

import "github.com/rackspace/gophercloud/rackspace/lb/v1/sessions"

Package sessions provides information and interaction with the Session Persistence feature of the Rackspace Cloud Load Balancer service.

Session persistence is a feature of the load balancing service that forces multiple requests from clients (of the same protocol) to be directed to the same node. This is common with many web applications that do not inherently share application state between back-end servers.

There are two modes to choose from: HTTP_COOKIE and SOURCE_IP. You can only set one of the session persistence modes on a load balancer, and it can only support one protocol. If you set HTTP_COOKIE mode for an HTTP load balancer, it supports session persistence for HTTP requests only. Likewise, if you set SOURCE_IP mode for an HTTPS load balancer, it supports session persistence for only HTTPS requests.

To support session persistence for both HTTP and HTTPS requests concurrently, choose one of the following options:

- Use two load balancers, one configured for session persistence for HTTP requests and the other configured for session persistence for HTTPS requests. That way, the load balancers support session persistence for both HTTP and HTTPS requests concurrently, with each load balancer supporting one of the protocols.

- Use one load balancer, configure it for session persistence for HTTP requests, and then enable SSL termination for that load balancer. The load balancer supports session persistence for both HTTP and HTTPS requests concurrently.

Index

Package Files

doc.go requests.go results.go urls.go

type CreateOpts Uses

type CreateOpts struct {
    // Required - can either be HTTPCOOKIE or SOURCEIP
    Type Type
}

CreateOpts is the common options struct used in this package's Create operation.

func (CreateOpts) ToSPCreateMap Uses

func (opts CreateOpts) ToSPCreateMap() (map[string]interface{}, error)

ToSPCreateMap casts a CreateOpts struct to a map.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToSPCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Create operation in this package.

type DisableResult Uses

type DisableResult struct {
    gophercloud.ErrResult
}

DisableResult represents the result of a disable operation.

func Disable Uses

func Disable(c *gophercloud.ServiceClient, lbID int) DisableResult

Disable is the operation responsible for disabling session persistence for a particular load balancer.

type EnableResult Uses

type EnableResult struct {
    gophercloud.ErrResult
}

EnableResult represents the result of an enable operation.

func Enable Uses

func Enable(c *gophercloud.ServiceClient, lbID int, opts CreateOptsBuilder) EnableResult

Enable is the operation responsible for enabling session persistence for a particular load balancer.

type GetResult Uses

type GetResult struct {
    gophercloud.Result
}

GetResult represents the result of a get operation.

func Get Uses

func Get(c *gophercloud.ServiceClient, lbID int) GetResult

Get is the operation responsible for showing details of the session persistence configuration for a particular load balancer.

func (GetResult) Extract Uses

func (r GetResult) Extract() (*SessionPersistence, error)

Extract interprets a GetResult as an SP, if possible.

type SessionPersistence Uses

type SessionPersistence struct {
    Type Type `mapstructure:"persistenceType"`
}

SessionPersistence indicates how a load balancer is using session persistence

type Type Uses

type Type string

Type represents the type of session persistence being used.

const (
    // HTTPCOOKIE is a session persistence mechanism that inserts an HTTP cookie
    // and is used to determine the destination back-end node. This is supported
    // for HTTP load balancing only.
    HTTPCOOKIE Type = "HTTP_COOKIE"

    // SOURCEIP is a session persistence mechanism that keeps track of the source
    // IP address that is mapped and is able to determine the destination
    // back-end node. This is supported for HTTPS pass-through and non-HTTP load
    // balancing only.
    SOURCEIP Type = "SOURCE_IP"
)

Package sessions imports 4 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners.