Categorygithub.com/loghole/tron
modulepackage
0.29.0
Repository: https://github.com/loghole/tron.git
Documentation: pkg.go.dev

# README

Tron

Installation

install tron:
curl -sSfL https://raw.githubusercontent.com/loghole/tron/main/install.sh | sh
tron version
install protoc:
  • linux
$ apt install -y protobuf-compiler
$ protoc --version
  • mac:
$ brew install protobuf
$ protoc --version

# Packages

No description provided by the author
Package transport contains base service desc interfaces.

# Functions

AddLogCaller configures the Logger to annotate each message with the filename and line number of zap's caller.
AddLogStacktrace configures the Logger to record a stack trace for all messages at or above a given level.
GetInfo returns base service information.
New init viper config, logger and tracer.
SetName overrides default the application name.
WithAdminHTTP returns a Option that sets admin http port.
WithAtomicLoggerLevel sets atomic logger level.
WithExitSignals returns a Option that sets exit signals for application.
WithGRPCListener returns a Option that sets net listener for grpc public server.
WithHTTPListener returns a Option that sets net listener for http public server.
WithLogField adds field to the Logger.
WithLoggerConfig sets logger config.
WithLoggerLevel sets logger level.
WithPublicGRPC returns a Option that sets public grpc port.
WithPublicHTTP returns a Option that sets public http port.
WithStreamInterceptor returns a RunOption that specifies the chained interceptor for streaming RPCs.
WithTLSConfig returns a RunOption that set tls configuration for grpc and http servers.
WithTLSKeyPair returns a RunOption that set tls configuration for grpc and http servers from files.
WithTracerConfiguration sets tracer config.
WithUnaryInterceptor returns a RunOption that specifies the chained interceptor for unary RPCs.

# Structs

App is base application object with grpc and http servers, logger and tracer.

# Type aliases

Info contains service information.
Option sets tron options such as ports, config, etc.
RunOption sets tron run options such as grpc unary interceptors, tls config.