Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnableToGetStream = errors.New("unable to get a stream")
)
Functions ¶
func DialServer ¶
func DialServer(ctx context.Context, config DialServerConfig) (*grpc.ClientConn, error)
Types ¶
type Client ¶
type Config ¶
type Config struct { Addr string Log logrus.FieldLogger TrustDomain url.URL // KeysAndBundle is a callback that must return the keys and bundle used by the client // to connect via mTLS to Addr. KeysAndBundle func() ([]*x509.Certificate, *ecdsa.PrivateKey, []*x509.Certificate) // RotMtx is used to prevent the creation of new connections during SVID rotations RotMtx *sync.RWMutex }
Config holds a client configuration
type DialServerConfig ¶
type DialServerConfig struct { // Address is the SPIRE server address Address string // TrustDomain is the trust domain ID for the agent/server TrustDomain string // GetBundle is a required callback that returns the current trust bundle // for used to authenticate the server certificate. GetBundle func() []*x509.Certificate // GetAgentCertificate is an optional callback used to return the agent // certificate to present to the server during the TLS handshake. GetAgentCertificate func() *tls.Certificate }
Click to show internal directories.
Click to hide internal directories.