systema

package
v2.2.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package system implements all of the yucky system-logic details for communicating with System A from the Telepresence manager.

The business-logic code (or at least the code one layer closer to being business-logic than this package is) must implement the ManagerServer interface, and call the ConnectToSystemA() function as appropriate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToSystemA

func ConnectToSystemA(ctx context.Context,
	self ManagerServer,
	systemaAddr string, systemaDialOpts ...grpc.DialOption,
) (client systema.SystemACRUDClient, wait func() error, err error)

ConnectToSystemA initiates a connection to System A.

The selfService argument is the ManagerServer implmentation that System A may make RPC calls to.

Shut down the connection by cancelling the context, then call the returned wait() function to wait for the connection to fully shut down.

Types

type ManagerServer

type ManagerServer interface {
	manager.ManagerServer
	DialIntercept(ctx context.Context, interceptID string) (net.Conn, error)
}

ManagerServer is the interface that you must implement for when System A talks to the Manager.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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