Documentation
¶
Overview ¶
Package rkgrpclog is an interface of logging for grpc framework
Index ¶
- Constants
- func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor
- func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
- func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor
- func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
- type Option
- func WithEntryNameAndType(entryName, entryType string) Option
- func WithEventLoggerEncoding(ec int) Option
- func WithEventLoggerEntry(eventLoggerEntry *rkentry.EventLoggerEntry) Option
- func WithEventLoggerOutputPaths(path ...string) Option
- func WithZapLoggerEncoding(ec int) Option
- func WithZapLoggerEntry(zapLoggerEntry *rkentry.ZapLoggerEntry) Option
- func WithZapLoggerOutputPaths(path ...string) Option
Constants ¶
const ( // ENCODING_CONSOLE encoding type as console for EventLoggerEntry ENCODING_CONSOLE int = 0 // ENCODING_JSON encoding type as json for EventLoggerEntry ENCODING_JSON int = 1 )
Variables ¶
This section is empty.
Functions ¶
func StreamClientInterceptor ¶
func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor
StreamClientInterceptor Create new stream client interceptor.
func StreamServerInterceptor ¶
func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
StreamServerInterceptor Create new stream server interceptor.
func UnaryClientInterceptor ¶
func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor
UnaryClientInterceptor Create new unary client interceptor.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
UnaryServerInterceptor Create new unary server interceptor.
Types ¶
type Option ¶
type Option func(*optionSet)
Option is params for creating interceptor
func WithEntryNameAndType ¶ added in v1.2.0
WithEntryNameAndType Provide entry name and entry type.
func WithEventLoggerEncoding ¶ added in v1.2.0
WithEventLoggerEncoding Provide ZapLoggerEncodingType. ENCODING_CONSOLE or ENCODING_JSON is supported.
func WithEventLoggerEntry ¶ added in v1.2.0
func WithEventLoggerEntry(eventLoggerEntry *rkentry.EventLoggerEntry) Option
WithEventLoggerEntry Provide rkentry.EventLoggerEntry.
func WithEventLoggerOutputPaths ¶ added in v1.2.0
WithEventLoggerOutputPaths Provide EventLogger Output Path. Multiple output path could be supported including stdout.
func WithZapLoggerEncoding ¶ added in v1.2.0
WithZapLoggerEncoding Provide ZapLoggerEncodingType. json or console is supported.
func WithZapLoggerEntry ¶ added in v1.2.0
func WithZapLoggerEntry(zapLoggerEntry *rkentry.ZapLoggerEntry) Option
WithZapLoggerEntry Provide rkentry.ZapLoggerEntry.
func WithZapLoggerOutputPaths ¶ added in v1.2.0
WithZapLoggerOutputPaths Provide ZapLogger Output Path. Multiple output path could be supported including stdout.