Documentation ¶
Index ¶
- func Context(c *gin.Context) context.Context
- func Dial(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func DialWithEtcd(ctx context.Context, serviceName string, cli *goo_etcd.Client) (*grpc.ClientConn, error)
- func GRPCInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (rsp interface{}, err error)
- type Config
- type GRPCGraceful
- type Health
- type Option
- type Resolver
- type ResolverEtcd
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func DialWithEtcd ¶ added in v1.0.2
func GRPCInterceptor ¶
func GRPCInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (rsp interface{}, err error)
Types ¶
type GRPCGraceful ¶
type GRPCGraceful struct {
// contains filtered or unexported fields
}
func NewGRPCGraceful ¶
func NewGRPCGraceful(nett, addr string, s *grpc.Server) *GRPCGraceful
func (*GRPCGraceful) Serve ¶
func (g *GRPCGraceful) Serve() error
type Health ¶
type Health struct{}
func (Health) Check ¶
func (Health) Check(context.Context, *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (Health) Watch ¶
func (Health) Watch(*grpc_health_v1.HealthCheckRequest, grpc_health_v1.Health_WatchServer) error
type Option ¶ added in v1.0.2
type Option struct { Name string Value interface{} }
func EtcdOption ¶ added in v1.0.2
func ProjectNameOption ¶ added in v1.0.2
func ServiceNameOption ¶ added in v1.0.2
func VersionOption ¶ added in v1.0.2
type Resolver ¶
type Resolver struct { }
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(o resolver.ResolveNowOptions)
type ResolverEtcd ¶ added in v1.0.2
type ResolverEtcd struct {
// contains filtered or unexported fields
}
func NewResolverEtcd ¶ added in v1.0.2
func NewResolverEtcd(ctx context.Context, cli *goo_etcd.Client) *ResolverEtcd
func (*ResolverEtcd) Build ¶ added in v1.0.2
func (b *ResolverEtcd) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
func (*ResolverEtcd) Scheme ¶ added in v1.0.2
func (b *ResolverEtcd) Scheme() string
Click to show internal directories.
Click to hide internal directories.