Documentation ¶
Index ¶
- Constants
- func Dial(ctx context.Context, socketName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func Exists(name string) (bool, error)
- func IsRunning(ctx context.Context, path string) (bool, error)
- func Listen(ctx context.Context, processName, socketName string) (net.Listener, error)
- func Remove(listener net.Listener) error
- func WaitUntilAppears(name, path string, ttw time.Duration) error
- func WaitUntilRunning(ctx context.Context, name, path string, ttw time.Duration) error
- func WaitUntilVanishes(name, path string, ttw time.Duration) error
Constants ¶
const ( // ConnectorName is the path used when communicating to the connector process. ConnectorName = "/tmp/telepresence-connector.socket" // DaemonName is the path used when communicating to the daemon process. DaemonName = "/var/run/telepresence-daemon.socket" )
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, socketName string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Dial dials the given socket and returns the resulting connection.
func IsRunning ¶
IsRunning makes an attempt to dial the given socket and returns true if that succeeds. If the attempt doesn't succeed the method returns false. No error is returned when the failed attempt is caused by a non-existing socket.
func WaitUntilAppears ¶
WaitUntilAppears waits until the socket at the given path comes into existence and returns when that happens. The wait will be max ttw (time to wait) long.
func WaitUntilRunning ¶
WaitUntilRunning waits until the socket at the given path comes into existence and a dial is successful and returns when that happens. The wait will be max ttw (time to wait) long.
func WaitUntilVanishes ¶
WaitUntilVanishes waits until the socket at the given path is removed and returns when that happens. The wait will be max ttw (time to wait) long. An error is returned if that time is exceeded before the socket is removed.
Types ¶
This section is empty.