ggrpcurl

package
v0.0.0-...-e9f0680 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Command grpcurl makes gRPC requests (a la cURL, but HTTP/2). It can use a supplied descriptor file, protobuf sources, or service reflection to translate JSON or text request data into the appropriate protobuf messages and vice versa for presenting the response contents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomEventHandler

type CustomEventHandler struct {
	*grpcurl.DefaultEventHandler
	ResponseMd metadata.MD
	TrailersMd metadata.MD
}

func (*CustomEventHandler) OnReceiveHeaders

func (h *CustomEventHandler) OnReceiveHeaders(md metadata.MD)

func (*CustomEventHandler) OnReceiveTrailers

func (h *CustomEventHandler) OnReceiveTrailers(stat *status.Status, md metadata.MD)

type GGrpCurlDTO

type GGrpCurlDTO struct {
	Plaintext     bool
	FormatError   bool
	EmitDefaults  bool
	AddHeaders    []string
	ImportPaths   []string
	ProtoFiles    []string
	Data          string // 请求数据
	ServiceAddr   string
	ServiceMethod string
	Trace         bool
}

GGrpCurlDTO 运行GRPCURL DTO

type InvokeGRpc

type InvokeGRpc struct {
	// contains filtered or unexported fields
}

func NewInvokeGRpc

func NewInvokeGRpc(dto *GGrpCurlDTO) *InvokeGRpc

func (*InvokeGRpc) Invoke

func (i *InvokeGRpc) Invoke() (metadata.MD, metadata.MD, string, *status.Status, error)

Invoke 运行GGrpCurl 方法 直接发送请求 returns * header * trailer * outWrite * Status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL