Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFiles ¶
func RegisterFiles(fds ...*desc.FileDescriptor)
Types ¶
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 GrpcReflectVersion ¶
type GrpcReflectVersion int
const ( GrpcReflectV1Alpha GrpcReflectVersion = iota // automatically determine which grpc reflection version to use GrpcReflectAuto )
func ParseGrpcReflectVersion ¶
func ParseGrpcReflectVersion(s string) GrpcReflectVersion
type ServiceCaller ¶
type ServiceCaller struct {
// contains filtered or unexported fields
}
func NewServiceCaller ¶
func NewServiceCaller(connFact *rpc.GrpcConnFactory, inMsgFormat, outMsgFormat MsgFormat, outJsonNames bool) *ServiceCaller
func (*ServiceCaller) CallClientStream ¶
func (sc *ServiceCaller) CallClientStream(ctx context.Context, serviceTarget string, methodDesc *desc.MethodDescriptor, messages [][]byte, callOpts ...grpc.CallOption) ([]byte, error)
CallClientStream allows calling unary or client stream methods as they both return only a single result
func (*ServiceCaller) CallStream ¶
func (sc *ServiceCaller) CallStream(ctx context.Context, serviceTarget string, methodDesc *desc.MethodDescriptor, messages [][]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 interface { GetServiceMetaDataList(context.Context) (ServiceMetaList, error) GetAdditionalFiles() ([]*desc.FileDescriptor, error) }
func NewServiceMetaData ¶
func NewServiceMetaData(cfg *ServiceMetaDataConfig) ServiceMetaData
NewServiceMetaData returns new instance of ServiceMetaData that reads service metadata by calling grpc Reflection service of the target
func NewServiceMetadataProto ¶
func NewServiceMetadataProto(protoPath, protoImports []string) ServiceMetaData
NewServiceMetadataProto returns new instance of ServiceMetaData that reads service metadata from proto files on disk. protoPath - proto files or directories of proto files protoImports - additional directories to search for proto files dependencies
type ServiceMetaDataConfig ¶
type ServiceMetaDataConfig struct { ConnFact *rpc.GrpcConnFactory Target string ProtoImports []string Deadline int ReflectVersion GrpcReflectVersion }
type ServiceMetaList ¶
type ServiceMetaList []*ServiceMeta
func (ServiceMetaList) Files ¶
func (l ServiceMetaList) Files() []*desc.FileDescriptor
Click to show internal directories.
Click to hide internal directories.