systema

package
v2.7.4-rc.2 Latest Latest
Warning

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

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

Documentation

Overview

Package systema implements all 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,
	conn *grpc.ClientConn,
) (client systema.SystemACRUDClient, wait func() error, err error)

ConnectToSystemA initiates a connection to System A.

The selfService argument is the ManagerServer implementation 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.

Jump to

Keyboard shortcuts

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