Documentation
¶
Overview ¶
Package client provides mieru client APIs for third party applications to integrate mieru protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ClientConfigurationService ClientLifecycleService ClientNetworkService }
Client contains methods supported by a mieru client.
type ClientConfig ¶
type ClientConfig struct { Profile *appctlpb.ClientProfile Resolver apicommon.DNSResolver }
ClientConfig stores proxy client configuration.
type ClientConfigurationService ¶
type ClientConfigurationService interface { // Load returns the client config. // It returns ErrNoClientConfig if client config is never stored. Load() (*ClientConfig, error) // Store saves the client config. // It returns wrapped ErrInvalidConfigConfig if the provided client config is invalid. Store(*ClientConfig) error }
ClientConfigurationService contains methods to manage proxy client configuration.
type ClientLifecycleService ¶
type ClientLifecycleService interface { // Start activates the client with the stored configuration. // Calling Start function more than once has undefined behavior. Start() error // Stop deactivates the client. // Established network connections are NOT terminated. // After stop, the client can't be reused. Stop() error // IsRunning returns true if the client has been started // and has not been stopped. IsRunning() bool }
ClientLifecycleService contains methods to manage proxy client lifecycle.
type ClientNetworkService ¶
type ClientNetworkService interface { // DialContext returns a new proxy connection to reach the destination. // It returns an error if the client has not been started, // or has been stopped. DialContext(context.Context, net.Addr) (net.Conn, error) // DialContextWithConn is similar to DialContext, but use the given // connection to establish a new proxy connection. DialContextWithConn(context.Context, net.Conn, net.Addr) (net.Conn, error) }
ClientNetworkService contains methods to establish connections to destinations using proxy servers.
Click to show internal directories.
Click to hide internal directories.