MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / certFile

Function certFile

internal/patroni/certificates.go:22–34  ·  view source on GitHub ↗

certFile concatenates the results of multiple PEM-encoding marshalers.

(texts ...encoding.TextMarshaler)

Source from the content-addressed store, hash-verified

20
21// certFile concatenates the results of multiple PEM-encoding marshalers.
22func certFile(texts ...encoding.TextMarshaler) ([]byte, error) {
23 var out []byte
24
25 for i := range texts {
26 if b, err := texts[i].MarshalText(); err == nil {
27 out = append(out, b...)
28 } else {
29 return nil, err
30 }
31 }
32
33 return out, nil
34}
35
36// instanceCertificates returns projections of Patroni's CAs, keys, and
37// certificates to include in the instance configuration volume.

Callers 3

TestCertFileFunction · 0.70
InstanceCertificatesFunction · 0.70

Calls 1

MarshalTextMethod · 0.45

Tested by 2

TestCertFileFunction · 0.56