client

package
v0.0.0-...-5861b17 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package client provides a client to the system agent that uses SSH and unix sockets to make the connection.

The SSH forwarding is based on code from: https://stackoverflow.com/questions/21417223/simple-ssh-port-forward-in-golang

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(endpoint string, auth []ssh.AuthMethod) (*Client, error)

New creates a new Client that connects to a remote endpoint via SSH and then uses that connection to dial into a domain socket the agent is using. The gRPC client actually uses a domain socket on this side which is then forwarded over SSH. endpoint is the host:port of the remote endpoint.

func (*Client) Close

func (c *Client) Close() error

func (*Client) Install

func (c *Client) Install(ctx context.Context, req *pb.InstallReq) (*pb.InstallResp, error)

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, req *pb.RemoveReq) (*pb.RemoveResp, error)

Directories

Path Synopsis
cli
cmd

Jump to

Keyboard shortcuts

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