Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterFiles ¶ added in v1.21.0
func RegisterFiles(fds ...*desc.FileDescriptor) error
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 protoreflect.MessageDescriptor, walkFn func(protoreflect.FieldDescriptor))
type GrpcReflectVersion ¶ added in v1.18.0
type GrpcReflectVersion int
const ( GrpcReflectV1Alpha GrpcReflectVersion = iota // automatically determine which grpc reflection version to use GrpcReflectAuto )
func ParseGrpcReflectVersion ¶ added in v1.18.0
func ParseGrpcReflectVersion(s string) GrpcReflectVersion
type MsgFormat ¶ added in v1.5.0
type MsgFormat int
Proto message format
func ParseMsgFormat ¶ added in v1.6.0
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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
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 ¶ added in v1.3.0
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 ¶ added in v1.18.0
type ServiceMetaDataConfig struct { ConnFact *rpc.GrpcConnFactory Target string ProtoImports []string Deadline int ReflectVersion GrpcReflectVersion }
type ServiceMetaList ¶ added in v1.13.0
type ServiceMetaList []*ServiceMeta
func (ServiceMetaList) Files ¶ added in v1.13.0
func (l ServiceMetaList) Files() []*desc.FileDescriptor
Click to show internal directories.
Click to hide internal directories.