MCPcopy
hub / github.com/grpc/grpc-go / WithPerRPCCredentials

Function WithPerRPCCredentials

dialoptions.go:447–451  ·  view source on GitHub ↗

WithPerRPCCredentials returns a DialOption which sets credentials and places auth state on each outbound RPC.

(creds credentials.PerRPCCredentials)

Source from the content-addressed store, hash-verified

445// WithPerRPCCredentials returns a DialOption which sets credentials and places
446// auth state on each outbound RPC.
447func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption {
448 return newFuncDialOption(func(o *dialOptions) {
449 o.copts.PerRPCCredentials = append(o.copts.PerRPCCredentials, creds)
450 })
451}
452
453// WithCredentialsBundle returns a DialOption to set a credentials bundle for
454// the ClientConn.WithCreds. This should not be used together with

Calls 1

newFuncDialOptionFunction · 0.85