...

Package tlscreds

import "google.golang.org/grpc/internal/xds/bootstrap/tlscreds"
Overview
Index

Overview ▾

Package tlscreds implements mTLS Credentials in xDS Bootstrap File. See gRFC A65: github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md.

func NewBundle

func NewBundle(jd json.RawMessage) (credentials.Bundle, func(), error)

NewBundle returns a credentials.Bundle which implements mTLS Credentials in xDS Bootstrap File. It delegates certificate loading to a file_watcher provider if either client certificates or server root CA is specified. The second return value is a close func that should be called when the caller no longer needs this bundle. See gRFC A65: github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md