core

package
v0.0.0-...-9758eb9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyPolicyList = errors.New("policy list is empty")
View Source
var ErrPolicyNotFound = errors.New("we couldn't find the policy")

Functions

func StringInSlice

func StringInSlice(s string, list []string) bool

Types

type ConnectorCore

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

func NewConnectorCore

func NewConnectorCore(logger *zap.Logger, cfg config.Config, discovery discover.Discover, border0API api.API, meta models.Metadata, version string) *ConnectorCore

func (*ConnectorCore) CheckAndUpdateSocket

func (c *ConnectorCore) CheckAndUpdateSocket(ctx context.Context, apiSocket, localSocket models.Socket) (*models.Socket, error)

func (*ConnectorCore) CheckSocketsToCreate

func (c *ConnectorCore) CheckSocketsToCreate(ctx context.Context, localSockets []models.Socket, socketsFromApiMap map[string]models.Socket) ([]models.Socket, error)

func (*ConnectorCore) CheckSocketsToDelete

func (c *ConnectorCore) CheckSocketsToDelete(ctx context.Context, socketApiMap map[string]models.Socket, localSocketsMap map[string]models.Socket) error

func (*ConnectorCore) CreateSocket

func (c *ConnectorCore) CreateSocket(ctx context.Context, s *models.Socket) (*models.Socket, error)

func (*ConnectorCore) DiscoverNewSocketChanges

func (c *ConnectorCore) DiscoverNewSocketChanges(ctx context.Context, ch chan []models.Socket)

func (*ConnectorCore) HandleUpdates

func (c *ConnectorCore) HandleUpdates(ctx context.Context, sockets []models.Socket) error

func (*ConnectorCore) IsSocketConnected

func (c *ConnectorCore) IsSocketConnected(key string) bool

func (*ConnectorCore) RecreateSocket

func (c *ConnectorCore) RecreateSocket(ctx context.Context, socketID string, localSocket models.Socket) (*models.Socket, error)

func (*ConnectorCore) SocketsCoreHandler

func (c *ConnectorCore) SocketsCoreHandler(ctx context.Context, socketsToUpdate []models.Socket) ([]models.Socket, error)

func (*ConnectorCore) TunnelConnectJob

func (c *ConnectorCore) TunnelConnectJob(ctx context.Context, group *errgroup.Group)

func (*ConnectorCore) TunnelConnnect

func (c *ConnectorCore) TunnelConnnect(ctx context.Context, socket models.Socket) error

type PolicyManager

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

func NewPolicyManager

func NewPolicyManager(logger *zap.Logger, api api.API) *PolicyManager

func (*PolicyManager) ApplyPolicies

func (p *PolicyManager) ApplyPolicies(ctx context.Context, socket models.Socket, localPolicies []string) ([]string, error)

Jump to

Keyboard shortcuts

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