latticestore

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATASTORE_SERVICE_NETWORK_NOT_EXIST = "service network does not exist in Data Store"
	DATASTORE_SERVICE_NOT_EXIST         = "service does not exist in Data Store"
	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

View Source
const (
	DATASTORE_SERVICE_NETWORK_CREATE_IN_PROGRESS = "service network is create-in-progress"
	DATASTORE_SERVICE_NETWORK_CREATED            = "service network is created and associated"
)

Status

Variables

This section is empty.

Functions

func AWSServiceName

func AWSServiceName(name string, namespace string) string

TODO , find out a good name AWSserviceName, or VSNServiceName or LatticeServiceName the max name length is 40

func TargetGroupName

func TargetGroupName(name string, namespace string) string

the max tg name length is 63

Types

type LatticeDataStore

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

func GetDefaultLatticeDataStore

func GetDefaultLatticeDataStore() *LatticeDataStore

func NewLatticeDataStore

func NewLatticeDataStore() *LatticeDataStore

func (*LatticeDataStore) AddLatticeService

func (ds *LatticeDataStore) AddLatticeService(name string, namespace string, arn string, id string, dns string) error

func (*LatticeDataStore) AddListener

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

func (*LatticeDataStore) AddServiceNetwork

func (ds *LatticeDataStore) AddServiceNetwork(name string, account string, arn string, id string, status string) error

func (*LatticeDataStore) AddTargetGroup

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

func (*LatticeDataStore) DelLatticeService

func (ds *LatticeDataStore) DelLatticeService(name string, namespace string) error

func (*LatticeDataStore) DelListener

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

func (*LatticeDataStore) DelServiceNetwork

func (ds *LatticeDataStore) DelServiceNetwork(name string, account string) error

func (*LatticeDataStore) DelTargetGroup

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

func (*LatticeDataStore) GetAllListeners

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

func (*LatticeDataStore) GetLatticeService

func (ds *LatticeDataStore) GetLatticeService(name string, namespace string) (LatticeService, error)

func (*LatticeDataStore) GetServiceNetworkStatus

func (ds *LatticeDataStore) GetServiceNetworkStatus(name string, account string) (ServiceNetwork, error)

func (*LatticeDataStore) GetTargetGroup

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

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, 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, targetList []Target) error

type LatticeDataStoreInfo

type LatticeDataStoreInfo struct {
	ServiceNetworks map[string]ServiceNetwork
	LatticeServices map[string]LatticeService
	TargetGroups    map[string]TargetGroup
	Listeners       map[string]Listener
}

type LatticeService

type LatticeService struct {
	LatticeServiceKey LatticeServiceKey
	ARN               string
	ID                string
	DNS               string
}

type LatticeServiceKey

type LatticeServiceKey struct {
	Name      string
	Namespace string
}

type LatticeServicePool

type LatticeServicePool map[LatticeServiceKey]*LatticeService

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 ServiceNetwork

type ServiceNetwork struct {
	Key    ServiceNetworkKey `json:"meshkey"`
	ARN    string            `json:"arn"`
	ID     string            `json:"id"`
	Status string            `json:"status"`
}

type ServiceNetworkKey

type ServiceNetworkKey struct {
	Name      string
	AccountID string
}

type ServiceNetworkPool

type ServiceNetworkPool map[ServiceNetworkKey]*ServiceNetwork

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