Documentation ¶
Index ¶
- Variables
- func DiagContext() context.Context
- func DiagStreamClientInterceptor() grpc.StreamClientInterceptor
- func DiagUnaryClientInterceptor() grpc.UnaryClientInterceptor
- func IsTemporary(err error) bool
- func MetadataStreamInterceptor(md map[string][]string) grpc.StreamClientInterceptor
- func MetadataUnaryInterceptor(md map[string][]string) grpc.UnaryClientInterceptor
- type ConnectionOptions
- type DiagInfo
- type FieldWalker
- type GrpcConnFactory
- func (f *GrpcConnFactory) Close() error
- func (f *GrpcConnFactory) CloseConn(target string) error
- func (f *GrpcConnFactory) GetConn(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func (f *GrpcConnFactory) GetConnContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- type ServiceCaller
- type ServiceMeta
- type ServiceMetaData
- func (s *ServiceMetaData) GetFileDescriptor(target, serviceName string) (*desc.FileDescriptor, error)
- func (s *ServiceMetaData) GetMethodDescriptor(target, service, methodName string) (*desc.MethodDescriptor, error)
- func (s *ServiceMetaData) GetOutputMessageDescriptor(target, service, methodName string) (*desc.MessageDescriptor, error)
- func (s *ServiceMetaData) GetOutputMessageDescriptorParse(target, fullMethodName string) (*desc.MessageDescriptor, error)
- func (s *ServiceMetaData) GetServiceMetaDataList(target string, deadline int) ([]*ServiceMeta, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("grpc element not found")
)
Functions ¶
func DiagContext ¶
func DiagStreamClientInterceptor ¶
func DiagStreamClientInterceptor() grpc.StreamClientInterceptor
func DiagUnaryClientInterceptor ¶
func DiagUnaryClientInterceptor() grpc.UnaryClientInterceptor
func MetadataStreamInterceptor ¶
func MetadataStreamInterceptor(md map[string][]string) grpc.StreamClientInterceptor
func MetadataUnaryInterceptor ¶
func MetadataUnaryInterceptor(md map[string][]string) grpc.UnaryClientInterceptor
Types ¶
type ConnectionOptions ¶
func NewConnectionOpts ¶
func NewConnectionOpts(target string) (*ConnectionOptions, error)
type DiagInfo ¶
func ExtractDiagInfo ¶
type FieldWalker ¶
type FieldWalker struct {
// contains filtered or unexported fields
}
FieldWalker walks fields message fields tree calling func for every field
func NewFieldWalker ¶
func NewFieldWalker() *FieldWalker
func (*FieldWalker) Walk ¶
func (fw *FieldWalker) Walk(md *desc.MessageDescriptor, walkFn func(*desc.FieldDescriptor))
type GrpcConnFactory ¶
type GrpcConnFactory struct {
// contains filtered or unexported fields
}
func NewGrpcConnFactory ¶
func NewGrpcConnFactory() *GrpcConnFactory
func (*GrpcConnFactory) Close ¶
func (f *GrpcConnFactory) Close() error
func (*GrpcConnFactory) CloseConn ¶
func (f *GrpcConnFactory) CloseConn(target string) error
func (*GrpcConnFactory) GetConn ¶
func (f *GrpcConnFactory) GetConn(target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
func (*GrpcConnFactory) GetConnContext ¶
func (f *GrpcConnFactory) GetConnContext(ctx context.Context, target string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
type ServiceCaller ¶
type ServiceCaller struct {
// contains filtered or unexported fields
}
func NewServiceCaller ¶
func NewServiceCaller(connFact *GrpcConnFactory) *ServiceCaller
func (*ServiceCaller) CallJSON ¶
func (sc *ServiceCaller) CallJSON(ctx context.Context, serviceTarget string, methodDesc *desc.MethodDescriptor, reqJSON []byte, callOpts ...grpc.CallOption) ([]byte, error)
func (*ServiceCaller) CallServerStream ¶
func (sc *ServiceCaller) CallServerStream(ctx context.Context, serviceTarget string, methodDesc *desc.MethodDescriptor, reqJSON []byte, callOpts ...grpc.CallOption) (chan []byte, chan error)
type ServiceMeta ¶
type ServiceMeta struct { Name string Methods []*desc.MethodDescriptor File *desc.FileDescriptor }
type ServiceMetaData ¶
type ServiceMetaData struct {
// contains filtered or unexported fields
}
func NewServiceMetaData ¶
func NewServiceMetaData(connFact *GrpcConnFactory) *ServiceMetaData
func (*ServiceMetaData) GetFileDescriptor ¶
func (s *ServiceMetaData) GetFileDescriptor(target, serviceName string) (*desc.FileDescriptor, error)
func (*ServiceMetaData) GetMethodDescriptor ¶
func (s *ServiceMetaData) GetMethodDescriptor(target, service, methodName string) (*desc.MethodDescriptor, error)
func (*ServiceMetaData) GetOutputMessageDescriptor ¶
func (s *ServiceMetaData) GetOutputMessageDescriptor(target, service, methodName string) (*desc.MessageDescriptor, error)
func (*ServiceMetaData) GetOutputMessageDescriptorParse ¶
func (s *ServiceMetaData) GetOutputMessageDescriptorParse(target, fullMethodName string) (*desc.MessageDescriptor, error)
func (*ServiceMetaData) GetServiceMetaDataList ¶
func (s *ServiceMetaData) GetServiceMetaDataList(target string, deadline int) ([]*ServiceMeta, error)
Click to show internal directories.
Click to hide internal directories.