Documentation ¶
Index ¶
- func Dial(ctx context.Context, socketName string, waitForSocket bool, ...) (*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 RootDaemonPath(ctx context.Context) string
- func UserDaemonPath(ctx context.Context) string
- func WaitForSocket(ctx context.Context, path string, ttw time.Duration) error
- func WaitUntilRunning(ctx context.Context, path string) error
- func WaitUntilVanishes(name, path string, ttw time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, socketName string, waitForSocket bool, opts ...grpc.DialOption) (*grpc.ClientConn, error)
Dial dials the given socket and returns the resulting connection.
func Exists ¶
Exists returns true if a socket is found with the given name, false otherwise. An error is returned if the state of the socket cannot be determined, or if the found entry is not a socket.
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 RootDaemonPath ¶ added in v2.13.0
RootDaemonPath is the path used when communicating to the root daemon process.
func UserDaemonPath ¶ added in v2.13.0
UserDaemonPath is the path used when communicating to the user daemon process.
func WaitForSocket ¶ added in v2.19.0
WaitForSocket 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.