portadapter

package
v0.0.0-...-b5aaafc Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyWorker

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

func NewDummyWorker

func NewDummyWorker(address string, grpcTimeout time.Duration, logging *logrus.Logger) *DummyWorker

func (*DummyWorker) AddToDummy

func (dummyWorker *DummyWorker) AddToDummy(ip string, id string) error

func (*DummyWorker) GetDummyRuntimeConfig

func (dummyWorker *DummyWorker) GetDummyRuntimeConfig(id string) (map[string]struct{}, error)

func (*DummyWorker) RemoveFromDummy

func (dummyWorker *DummyWorker) RemoveFromDummy(ip string, id string) error

type HealthcheckChecker

type HealthcheckChecker struct {
	Conn *grpc.ClientConn
	// contains filtered or unexported fields
}

func NewHealthcheckChecker

func NewHealthcheckChecker(address string, grpcTimeout time.Duration, logging *logrus.Logger) (*HealthcheckChecker, error)

func (*HealthcheckChecker) IsHttpAdvancedCheckOk

func (healthcheckChecker *HealthcheckChecker) IsHttpAdvancedCheckOk(healthcheckType string,
	healthcheckAddress string,
	nearFieldsMode bool,
	userDefinedData map[string]string,
	timeout time.Duration,
	fwmark int,
	id string) bool

func (*HealthcheckChecker) IsHttpCheckOk

func (healthcheckChecker *HealthcheckChecker) IsHttpCheckOk(healthcheckAddress string,
	uri string,
	validResponseCodes []int64,
	timeout time.Duration,
	fwmark int,
	id string) bool

func (*HealthcheckChecker) IsHttpsCheckOk

func (healthcheckChecker *HealthcheckChecker) IsHttpsCheckOk(healthcheckAddress string,
	uri string,
	validResponseCodes []int64,
	timeout time.Duration,
	fwmark int,
	id string) bool

func (*HealthcheckChecker) IsIcmpCheckOk

func (healthcheckChecker *HealthcheckChecker) IsIcmpCheckOk(ipS string,
	timeout time.Duration,
	fwmark int,
	id string) bool

func (*HealthcheckChecker) IsTcpCheckOk

func (healthcheckChecker *HealthcheckChecker) IsTcpCheckOk(healthcheckAddress string,
	timeout time.Duration,
	fwmark int,
	id string) bool

type IDGenerator

type IDGenerator struct {
}

IDGenerator ...

func NewIDGenerator

func NewIDGenerator() *IDGenerator

NewIDGenerator ...

func NewUUIIDGenerator

func NewUUIIDGenerator() *IDGenerator

NewUUIIDGenerator ...

func (*IDGenerator) NewID

func (idGenerator *IDGenerator) NewID() string

NewID generate new ID in domain id model/struct

type IpRuleWorker

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

func NewIpRuleWorker

func NewIpRuleWorker(address string, grpcTimeout time.Duration, logging *logrus.Logger) *IpRuleWorker

func (*IpRuleWorker) AddIPRule

func (ipRuleWorker *IpRuleWorker) AddIPRule(hcTunDestIP string, id string) error

func (*IpRuleWorker) GetIPRulerRuntime

func (ipRuleWorker *IpRuleWorker) GetIPRulerRuntime(id string) (map[int]struct{}, error)

GetIPRulerRuntime ...

func (*IpRuleWorker) RemoveIPRule

func (ipRuleWorker *IpRuleWorker) RemoveIPRule(hcTunDestIP string, id string) error

type IpvsWorker

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

func NewIpvsWorker

func NewIpvsWorker(address string, grpcTimeout time.Duration, logging *logrus.Logger) *IpvsWorker

func (*IpvsWorker) AddIPVSApplicationServersForService

func (ipvsWorker *IpvsWorker) AddIPVSApplicationServersForService(vip string,
	port uint16,
	routingType uint32,
	balanceType string,
	protocol uint16,
	applicationServers map[string]uint16,
	id string) error

func (*IpvsWorker) GetIPVSRuntime

func (ipvsWorker *IpvsWorker) GetIPVSRuntime(id string) (map[string]map[string]uint16, error)

func (*IpvsWorker) NewIPVSService

func (ipvsWorker *IpvsWorker) NewIPVSService(vip string,
	port uint16,
	routingType uint32,
	balanceType string,
	protocol uint16,
	id string) error

func (*IpvsWorker) RemoveIPVSApplicationServersFromService

func (ipvsWorker *IpvsWorker) RemoveIPVSApplicationServersFromService(vip string,
	port uint16,
	routingType uint32,
	balanceType string,
	protocol uint16,
	applicationServers map[string]uint16,
	id string) error

func (*IpvsWorker) RemoveIPVSService

func (ipvsWorker *IpvsWorker) RemoveIPVSService(vip string,
	port uint16,
	protocol uint16,
	id string) error

type MemoryWorker

type MemoryWorker struct {
	sync.Mutex
	Services                     map[string]*domain.ServiceInfo
	ApplicationServersTunnelInfo map[string]int
}

MemoryWorker ...

func (*MemoryWorker) AddService

func (memoryWorker *MemoryWorker) AddService(serviceInfo *domain.ServiceInfo) error

func (*MemoryWorker) AddTunnelForApplicationServer

func (memoryWorker *MemoryWorker) AddTunnelForApplicationServer(appSrvIP string) bool

func (*MemoryWorker) GetService

func (memoryWorker *MemoryWorker) GetService(serviceAddress string) (*domain.ServiceInfo, error)

func (*MemoryWorker) GetServices

func (memoryWorker *MemoryWorker) GetServices() map[string]*domain.ServiceInfo

func (*MemoryWorker) RemoveService

func (memoryWorker *MemoryWorker) RemoveService(serviceInfo *domain.ServiceInfo) error

func (*MemoryWorker) RemoveTunnelForApplicationServer

func (memoryWorker *MemoryWorker) RemoveTunnelForApplicationServer(appSrvIP string) bool

func (*MemoryWorker) UpdateService

func (memoryWorker *MemoryWorker) UpdateService(serviceInfo *domain.ServiceInfo) error

type RouteWorker

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

func NewRouteWorker

func NewRouteWorker(address string, grpcTimeout time.Duration, logging *logrus.Logger) *RouteWorker

func (*RouteWorker) AddRoute

func (routeWorker *RouteWorker) AddRoute(hcDestIP string, hcTunDestIP string, id string) error

func (*RouteWorker) GetRouteRuntimeConfig

func (routeWorker *RouteWorker) GetRouteRuntimeConfig(id string) ([]string, error)

func (*RouteWorker) RemoveRoute

func (routeWorker *RouteWorker) RemoveRoute(hcDestIP string, hcTunDestIP string, id string) error

type TunnelWorker

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

func NewTunnelWorker

func NewTunnelWorker(address string, grpcTimeout time.Duration, logging *logrus.Logger) *TunnelWorker

func (*TunnelWorker) AddTunnel

func (tunnelWorker *TunnelWorker) AddTunnel(hcTunDestIP string, id string) error

func (*TunnelWorker) GetTunnelRuntime

func (tunnelWorker *TunnelWorker) GetTunnelRuntime(id string) (map[string]struct{}, error)

func (*TunnelWorker) RemoveTunnel

func (tunnelWorker *TunnelWorker) RemoveTunnel(hcTunDestIP string, id string) error

type UUIDGenerator

type UUIDGenerator struct {
}

UUIDGenerator ...

func (*UUIDGenerator) NewID

func (uuidGenerator *UUIDGenerator) NewID() string

NewID generate new ID in domain id model/struct

Jump to

Keyboard shortcuts

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