aboutsummaryrefslogtreecommitdiff
path: root/pkg/goexec/client.go
blob: bee03994899493586f69b618483f80b1c9bc28d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package goexec

import "context"

// Client represents an application layer network client
type Client interface {

  // Connect establishes a connection to the remote server
  Connect(ctx context.Context) error

  // Close terminates the active connection and frees allocated resources
  Close(ctx context.Context) error
}

// ClientOptions represents configuration options for a Client
type ClientOptions struct {

  // Proxy specifies the URI of the proxy server to route client requests through
  Proxy string `json:"proxy,omitempty" yaml:"proxy,omitempty"`

  // Host specifies the hostname or IP address that the client should connect to
  Host string `json:"host" yaml:"host"`

  // Port specifies the network port on Host that the client will connect to
  Port uint16 `json:"port" yaml:"port"`
}