live_sync

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectionManagerSubsystem

func NewConnectionManagerSubsystem(broker cqrs.Broker, logger logz.FieldLogger, manager *ConnectionManager) *subsystems.Process

NewConnectionManagerSubsystem waits for port binder events and creates streaming GRPC connections for the live sync subsystem

func NewFSSync

func NewFSSync(broker cqrs.Broker, logger logz.FieldLogger, manager *ConnectionManager, config workspace.Config) *subsystems.Process

Types

type ConnectionManager

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

ConnectionManager is the client struct for the live sync subsystem

func NewConnectionManager

func NewConnectionManager(ctx context.Context) *ConnectionManager

NewConnectionManager creates a pointer to a connection manager with its parent context set

func (*ConnectionManager) Connect

func (c *ConnectionManager) Connect(key, address string) error

Connect uses gRPC to dial the given address and stores the client in the connections sync map

func (*ConnectionManager) Disconnect

func (c *ConnectionManager) Disconnect(key string) error

Disconnect closes the client connection

func (*ConnectionManager) GetAllConnections

func (c *ConnectionManager) GetAllConnections() (connections []entrypoint.Sync_StreamFileChangeClient)

GetAllConnections returns a list of ready connections to connect with

func (*ConnectionManager) Len

func (c *ConnectionManager) Len() (count int)

Len returns the count of connections

Jump to

Keyboard shortcuts

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