MCPcopy
hub / github.com/grafana/tempo / grpcTransportCredentials

Function grpcTransportCredentials

cmd/tempo-cli/shared.go:194–207  ·  view source on GitHub ↗
(secure bool)

Source from the content-addressed store, hash-verified

192}
193
194func grpcTransportCredentials(secure bool) (opt grpc.DialOption, err error) {
195 var creds credentials.TransportCredentials
196 if secure {
197 certPool, err := x509.SystemCertPool()
198 if err != nil {
199 return nil, err
200 }
201 creds = credentials.NewClientTLSFromCert(certPool, "")
202 } else {
203 creds = insecure.NewCredentials()
204 }
205
206 return grpc.WithTransportCredentials(creds), nil
207}
208
209// parseTime parses a time string that can be:
210// - relative: "now", "now-1h", "now-30m", "now-3h30m"

Callers 5

searchGRPCMethod · 0.85
searchGRPCMethod · 0.85
searchGRPCMethod · 0.85
queryRangeGRPCMethod · 0.85
queryInstantGRPCMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected