grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPC_TIMEOUT          = time.Second * 10
	GRPC_MAX_MESSAGE_SIZE = 4 * 1024 * 1024 // 4 MB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPC

type GRPC struct {
	Ctx    context.Context
	Conn   *entity.Session
	Logger *logger.Logger
}

func NewGRPC

func NewGRPC(logger *logger.Logger, session *entity.Session) GRPC

NewGRPC is used to create a new grpc object

func (*GRPC) CheckSelectedMethod

func (g *GRPC) CheckSelectedMethod() error

func (*GRPC) Connect

func (g *GRPC) Connect() error

Connect is used to connect to the server and doing check if the server support server reflection

func (*GRPC) ExportGrpcurlCommand

func (g *GRPC) ExportGrpcurlCommand() (string, error)

Export is used to export the current grpc session into grpcurl commands

func (*GRPC) GenerateRPCPayloadSample

func (g *GRPC) GenerateRPCPayloadSample() (string, error)

GenerateRPCPayloadSample is used to generate sample request payload that will be filled to txtPayload text field

func (*GRPC) InvokeRPC

func (g *GRPC) InvokeRPC() error

InvokeRPC will invoke the configured payload and try to hit the server with it

Jump to

Keyboard shortcuts

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