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.