Documentation ¶
Index ¶
- func ConvertGrpcStatus(err error) int
- func MakeGRPCConnect(target string, isTLS bool, dialOptions GrpcDialOptions) (conn *grpc.ClientConn, err error)
- type AnswLogConfig
- type GrpcDialOptions
- type Gun
- func (g *Gun) Answ(method *desc.MethodDescriptor, message *dynamic.Message, ...)
- func (g *Gun) AnswLogging(logger *zap.Logger, method *desc.MethodDescriptor, request proto.Message, ...)
- func (g *Gun) Bind(aggr core.Aggregator, deps core.GunDeps) error
- func (g *Gun) Shoot(am core.Ammo)
- func (g *Gun) WarmUp(opts *warmup.Options) (any, error)
- type GunConfig
- type Sample
- type SharedDeps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertGrpcStatus ¶ added in v0.5.19
func MakeGRPCConnect ¶ added in v0.5.19
func MakeGRPCConnect(target string, isTLS bool, dialOptions GrpcDialOptions) (conn *grpc.ClientConn, err error)
Types ¶
type AnswLogConfig ¶ added in v0.5.7
type GrpcDialOptions ¶ added in v0.5.19
type Gun ¶
type Gun struct { DebugLog bool Conf GunConfig Aggr core.Aggregator core.GunDeps Stub grpcdynamic.Stub Services map[string]desc.MethodDescriptor AnswLog *zap.Logger }
func (*Gun) AnswLogging ¶ added in v0.5.19
type GunConfig ¶
type GunConfig struct { Target string `validate:"required"` ReflectPort int64 `config:"reflect_port"` ReflectMetadata map[string]string `config:"reflect_metadata"` Timeout time.Duration `config:"timeout"` // grpc request timeout TLS bool `config:"tls"` DialOptions GrpcDialOptions `config:"dial_options"` AnswLog AnswLogConfig `config:"answlog"` ClientNumber int `config:"client-number,omitempty"` Enabled bool `config:"enabled"` } `config:"shared-client,omitempty"` }
func DefaultGunConfig ¶ added in v0.5.7
func DefaultGunConfig() GunConfig
type SharedDeps ¶ added in v0.5.22
type SharedDeps struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.