Documentation ¶
Index ¶
- func ConnectInClusterAPIClient() *kubernetes.Clientset
- func ConnectK8sClient() *kubernetes.Clientset
- func ConnectLocalAPIClient(kubeConfig string) *kubernetes.Clientset
- func CreateK8sSecrets(namespace, secretname string, data map[string][]byte) error
- func DedupRegistrationEntries(entries []*common.RegistrationEntry) []*common.RegistrationEntry
- func DeleteK8sSecrets(namespace, secretname, typeString string) error
- func DeriveRegEntryhash(entry *common.RegistrationEntry) (key string)
- func EqualsSelectors(a, b []*common.Selector) bool
- func GRPCDialContext(ctx context.Context, target string, options ...grpc.DialOption) (*grpc.ClientConn, error)
- func GetK8sSecrets(namespace, secretname string) (v1.Secret, error)
- func GetSHA256Digest(path string, limit int64) (string, error)
- func GetTargetName(addr net.Addr) (string, error)
- func GetUnixAddr(name string) *net.UnixAddr
- func GetUnixAddrWithAbsPath(path string) (*net.UnixAddr, error)
- func GetWorkloadAPIClientOption(addr net.Addr) (workloadapi.ClientOption, error)
- func LoadCertPool(path string) (*x509.CertPool, error)
- func LoadCertificates(path string) ([]*x509.Certificate, error)
- func MakeCSR(privateKey interface{}, spiffeID spiffeid.ID) ([]byte, error)
- func MakeCSRWithoutURISAN(privateKey interface{}) ([]byte, error)
- func NewCertPool(certs ...*x509.Certificate) *x509.CertPool
- func RunTasks(ctx context.Context, tasks ...func(context.Context) error) error
- func SerialRun(tasks ...func(context.Context) error) func(ctx context.Context) error
- func SortRegistrationEntries(entries []*common.RegistrationEntry)
- func SortSelectors(selectors []*common.Selector)
- func SortTypesEntries(entries []*types.Entry)
- func SortTypesSelectors(selectors []*types.Selector)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectInClusterAPIClient ¶
func ConnectInClusterAPIClient() *kubernetes.Clientset
func ConnectK8sClient ¶
func ConnectK8sClient() *kubernetes.Clientset
func ConnectLocalAPIClient ¶
func ConnectLocalAPIClient(kubeConfig string) *kubernetes.Clientset
func CreateK8sSecrets ¶
func DedupRegistrationEntries ¶
func DedupRegistrationEntries(entries []*common.RegistrationEntry) []*common.RegistrationEntry
func DeleteK8sSecrets ¶
func DeriveRegEntryhash ¶
func DeriveRegEntryhash(entry *common.RegistrationEntry) (key string)
func EqualsSelectors ¶
func GRPCDialContext ¶
func GRPCDialContext(ctx context.Context, target string, options ...grpc.DialOption) (*grpc.ClientConn, error)
func GetSHA256Digest ¶
GetSHA256Digest calculates the sha256 digest of a file specified by path. If the size of the file exceeds the provided limit, the hash will not be calculated and an error will be returned instead.
func GetTargetName ¶
GetTargetName gets the fully qualified, self contained name used for gRPC channel construction. Supported networks are unix and tcp. Unix paths must be absolute.
func GetUnixAddr ¶
func GetUnixAddrWithAbsPath ¶
GetUnixAddr returns a unix address with the designated path. Path is converted to an absolute path when constructing the returned unix domain socket address.
func GetWorkloadAPIClientOption ¶
func GetWorkloadAPIClientOption(addr net.Addr) (workloadapi.ClientOption, error)
func LoadCertPool ¶
LoadCertPool loads one or more certificates into an *x509.CertPool from a PEM file on disk.
func LoadCertificates ¶
func LoadCertificates(path string) ([]*x509.Certificate, error)
LoadCertificates loads one or more certificates into an []*x509.Certificate from a PEM file on disk.
func MakeCSRWithoutURISAN ¶
func NewCertPool ¶
func NewCertPool(certs ...*x509.Certificate) *x509.CertPool
NewCertPool creates a new *x509.CertPool based on the certificates given as parameters.
func RunTasks ¶
RunTasks executes all of the provided functions concurrently and waits for them all to complete. If a function returns an error, all other functions are canceled (i.e. the context they are passed is canceled) and the error is returned. If all functions finish to completion successfully, RunTasks returns nil. If the context passed to RunTasks is canceled then each function is canceled and RunTasks returns ctx.Err(). Tasks passed to RunTasks MUST support cancelation via the provided context for RunTasks to work properly.
func SerialRun ¶
SerialRun executes all of the provided functions serially. If all functions finish to completion successfully, SerialRun returns nil. If the context passed to SerialRun is canceled then each function is canceled and SerialRun returns ctx.Err(). Tasks passed to SerialRun MUST support cancelation via the provided context for SerialRun to work properly.
func SortRegistrationEntries ¶
func SortRegistrationEntries(entries []*common.RegistrationEntry)
func SortSelectors ¶
func SortTypesEntries ¶
func SortTypesSelectors ¶
Types ¶
This section is empty.