latticestore

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATASTORE_TG_NOT_EXIST       = "target Group does not exist in Data Store"
	DATASTORE_LISTENER_NOT_EXIST = "listener does not exist in Data Store"
)

ERROR CODE

Variables

This section is empty.

Functions

func TargetGroupLongName added in v0.0.12

func TargetGroupLongName(defaultName, routeName, vpcId string) string

worst case - (70)-(20)-(21)-https-http2 (125 chars)

func TargetGroupName

func TargetGroupName(name, namespace string) string

the max tg name length is 127 worst case - k8s-(50)-(50)-https-http2 (117 chars)

Types

type LatticeDataStore

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

func GetDefaultLatticeDataStore

func GetDefaultLatticeDataStore() *LatticeDataStore

func NewLatticeDataStore

func NewLatticeDataStore() *LatticeDataStore

func NewLatticeDataStoreWithLog added in v0.0.16

func NewLatticeDataStoreWithLog(log gwlog.Logger) *LatticeDataStore

func (*LatticeDataStore) AddListener

func (ds *LatticeDataStore) AddListener(name string, namespace string, port int64, protocol string, arn string, id string) error

func (*LatticeDataStore) AddTargetGroup

func (ds *LatticeDataStore) AddTargetGroup(name string, vpc string, arn string, tgID string,
	isServiceImport bool, routeName string) error

func (*LatticeDataStore) DelListener

func (ds *LatticeDataStore) DelListener(name string, namespace string, port int64, protocol string) error

func (*LatticeDataStore) DelTargetGroup

func (ds *LatticeDataStore) DelTargetGroup(name string, routeName string, isServiceImport bool) error

func (*LatticeDataStore) GetAllListeners

func (ds *LatticeDataStore) GetAllListeners(name string, namespace string) ([]*Listener, error)

func (*LatticeDataStore) GetTargetGroup

func (ds *LatticeDataStore) GetTargetGroup(name string, routeName string, isServiceImport bool) (TargetGroup, error)

func (*LatticeDataStore) GetTargetGroupsByName added in v0.0.16

func (ds *LatticeDataStore) GetTargetGroupsByName(name string) []TargetGroup

func (*LatticeDataStore) GetlListener

func (ds *LatticeDataStore) GetlListener(name string, namespace string, port int64, protocol string) (Listener, error)

func (*LatticeDataStore) ServeIntrospection

func (c *LatticeDataStore) ServeIntrospection()

func (*LatticeDataStore) SetTargetGroupByBackendRef

func (ds *LatticeDataStore) SetTargetGroupByBackendRef(name string, routeName string, isServiceImport bool, byBackendRef bool) error

func (*LatticeDataStore) SetTargetGroupByServiceExport

func (ds *LatticeDataStore) SetTargetGroupByServiceExport(name string, isServiceImport bool, byServiceExport bool) error

func (*LatticeDataStore) UpdateTargetsForTargetGroup

func (ds *LatticeDataStore) UpdateTargetsForTargetGroup(name string, routeName string, targetList []Target) error

type LatticeDataStoreInfo

type LatticeDataStoreInfo struct {
	TargetGroups map[string]TargetGroup
	Listeners    map[string]Listener
}

type Listener

type Listener struct {
	Key ListenerKey
	ARN string
	ID  string
}

type ListenerKey

type ListenerKey struct {
	Name      string
	Namespace string
	Port      int64
	Protocol  string
}

type ListenerPool

type ListenerPool map[ListenerKey]*Listener

type LoggingHandler

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

LoggingHandler is a object for handling http request

func (LoggingHandler) ServeHTTP

func (lh LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Target

type Target struct {
	TargetIP   string
	TargetPort int64
}

type TargetGroup

type TargetGroup struct {
	TargetGroupKey  TargetGroupKey
	ARN             string
	ID              string
	EndPoints       []Target
	VpcID           string
	ByServiceExport bool // triggered by K8S serviceexport object
	ByBackendRef    bool // triggered by backend ref which points to service
}

type TargetGroupKey

type TargetGroupKey struct {
	Name            string
	RouteName       string
	IsServiceImport bool
}

type TargetGroupPool

type TargetGroupPool map[TargetGroupKey]*TargetGroup

Jump to

Keyboard shortcuts

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