Documentation ¶
Index ¶
- Variables
- func CreateToken(claims JwtClaims) (token map[string]string, err error)
- type JwtClaims
- type StatsHandler
- func (h *StatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)
- func (h *StatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)
- func (h *StatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (h *StatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AccessExpiresIn token access expires in duration AccessExpiresIn = 12 * time.Hour )
Functions ¶
Types ¶
type StatsHandler ¶
type StatsHandler struct{}
StatsHandler Handler defines the interface for the related stats handling (e.g., RPCs, connections).
func (*StatsHandler) HandleConn ¶
func (h *StatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)
HandleConn processes the Conn stats.
func (*StatsHandler) HandleRPC ¶
func (h *StatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)
HandleRPC processes the RPC stats.
func (*StatsHandler) TagConn ¶
func (h *StatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
TagConn can attach some information to the given context. The returned context will be used for stats handling. For conn stats handling, the context used in HandleConn for this connection will be derived from the context returned. For RPC stats handling,
- On server side, the context used in HandleRPC for all RPCs on this
connection will be derived from the context returned.
- On client side, the context is not derived from the context returned.
func (*StatsHandler) TagRPC ¶
func (h *StatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
TagRPC can attach some information to the given context. The context used for the rest lifetime of the RPC will be derived from the returned context.
Click to show internal directories.
Click to hide internal directories.