rpccontext

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 12 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMetricsLabel

func AddMetricsLabel(ctx context.Context, name, value string)

func AddRPCAuditFields added in v1.0.1

func AddRPCAuditFields(ctx context.Context, fields logrus.Fields)

func AuditLog added in v1.0.1

func AuditLog(ctx context.Context) (audit.Logger, bool)

func AuditRPC added in v1.0.1

func AuditRPC(ctx context.Context)

func AuditRPCWithError added in v1.0.1

func AuditRPCWithError(ctx context.Context, err error)

func AuditRPCWithFields added in v1.0.1

func AuditRPCWithFields(ctx context.Context, fields logrus.Fields)

func AuditRPCWithTypesStatus added in v1.0.1

func AuditRPCWithTypesStatus(ctx context.Context, s *types.Status, fieldsFunc func() logrus.Fields)

func CallCounter

func CallCounter(ctx context.Context) api.CallCounter

func CallerAddr

func CallerAddr(ctx context.Context) net.Addr

CallerAddr returns the caller address.

func CallerAdminEntries

func CallerAdminEntries(ctx context.Context) ([]*types.Entry, bool)

CallerAdminEntries returns the admin entries for the caller. If the caller is not an admin caller, it returns false.

func CallerDownstreamEntries

func CallerDownstreamEntries(ctx context.Context) ([]*types.Entry, bool)

CallerDownstreamEntries returns the downstream entries for the caller. If the caller is not a downstream caller, it returns false.

func CallerID

func CallerID(ctx context.Context) (spiffeid.ID, bool)

CallerID returns the caller ID, if available.

func CallerIsAdmin

func CallerIsAdmin(ctx context.Context) bool

CallerIsAdmin returns true if the caller is an admin caller.

func CallerIsAgent

func CallerIsAgent(ctx context.Context) bool

CallerIsAgent returns true if the caller is an agent.

func CallerIsDownstream

func CallerIsDownstream(ctx context.Context) bool

CallerIsDownstream returns true if the caller is a downstream caller.

func CallerIsLocal

func CallerIsLocal(ctx context.Context) bool

CallerIsLocal returns true if the caller is local.

func CallerX509SVID

func CallerX509SVID(ctx context.Context) (*x509.Certificate, bool)

CallerX509SVID returns the caller X509SVID, if available.

func Logger

func Logger(ctx context.Context) logrus.FieldLogger

func Names

func Names(ctx context.Context) (api.Names, bool)

func RateLimit

func RateLimit(ctx context.Context, count int) error

func RateLimiter

func RateLimiter(ctx context.Context) (api.RateLimiter, bool)

func WithAgentCaller

func WithAgentCaller(ctx context.Context) context.Context

WithAgentCaller returns a context whether the caller is tagged as an agent.

func WithAuditLog added in v1.0.1

func WithAuditLog(ctx context.Context, auditLog audit.Logger) context.Context

func WithCallCounter

func WithCallCounter(ctx context.Context, counter api.CallCounter) context.Context

func WithCallerAddr

func WithCallerAddr(ctx context.Context, addr net.Addr) context.Context

WithCallerAddr returns a context with the given address.

func WithCallerAdminEntries

func WithCallerAdminEntries(ctx context.Context, entries []*types.Entry) context.Context

WithCallerAdminEntries returns a context with the given entries.

func WithCallerDownstreamEntries

func WithCallerDownstreamEntries(ctx context.Context, entries []*types.Entry) context.Context

WithCallerDownstreamEntries returns a context with the given entries.

func WithCallerID

func WithCallerID(ctx context.Context, id spiffeid.ID) context.Context

WithCallerID returns a context with the given ID.

func WithCallerX509SVID

func WithCallerX509SVID(ctx context.Context, x509SVID *x509.Certificate) context.Context

WithCallerX509SVID returns a context with the given X509SVID.

func WithLocalCaller

func WithLocalCaller(ctx context.Context) context.Context

WithLocalCaller returns a context whether the caller is tagged as local.

func WithLogger

func WithLogger(ctx context.Context, log logrus.FieldLogger) context.Context

func WithNames

func WithNames(ctx context.Context, names api.Names) context.Context

func WithRateLimiter

func WithRateLimiter(ctx context.Context, limiter api.RateLimiter) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL