client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgentWfe = "trustyca-wfe"
)

UserAgent is the user agent for the client

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ClientTLS describes the TLS certs used to connect to the cluster
	ClientTLS gserver.TLSInfo `json:"client_tls,omitempty" yaml:"client_tls,omitempty"`

	// ServerURL specifies URLs for each server
	ServerURL map[string]string `json:"server_url,omitempty" yaml:"server_url,omitempty"`

	// DialTimeout is the timeout for failing to establish a connection.
	DialTimeout time.Duration `json:"dial_timeout,omitempty" yaml:"dial_timeout,omitempty"`

	// DialKeepAliveTime is the time after which client pings the server to see if
	// transport is alive.
	DialKeepAliveTime time.Duration `json:"dial_keep_alive_time,omitempty" yaml:"dial_keep_alive_time,omitempty"`

	// DialKeepAliveTimeout is the time that the client waits for a response for the
	// keep-alive probe. If the response is not received in this time, the connection is closed.
	DialKeepAliveTimeout time.Duration `json:"dial_keep_alive_timeout,omitempty" yaml:"dial_keep_alive_timeout,omitempty"`

	// EnableCNA enables Cloud Native Auth
	EnableCNA bool `json:"enable_cna,omitempty" yaml:"enable_cna,omitempty"`
}

Config specifies configurations for the client to connect to the cluster

type Factory

type Factory interface {
	// StatusClient returns Status client
	StatusClient(svc string, ops ...Option) (pb.StatusServer, io.Closer, error)
}

Factory specifies interface to create Client

func NewFactory

func NewFactory(cfg Config, ops ...Option) Factory

NewFactory returns new Factory

type HTTPStatusClient

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

HTTPStatusClient provides Status over legacy HTTP

func NewHTTPStatusClient

func NewHTTPStatusClient(client retriable.HTTPClient) *HTTPStatusClient

NewHTTPStatusClient returns legacy HTTP client

func (*HTTPStatusClient) Status

Status returns ServerStatusResponse

func (*HTTPStatusClient) Version

func (c *HTTPStatusClient) Version(ctx context.Context) (*pb.ServerVersion, error)

Version returns ServerVersion

type Option

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

Option configures how we set up the client

func WithAgent

func WithAgent(agent string) Option

WithAgent option to provide client Agent

func WithCallerIdentity

func WithCallerIdentity(callerIdentity credentials.CallerIdentity) Option

WithCallerIdentity option to provide CallerIdentity

func WithTLS

func WithTLS(tlsCfg *tls.Config) Option

WithTLS option to provide tls.Config

Jump to

Keyboard shortcuts

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