grpc

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: BSD-3-Clause Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestNotFound = errors.New("request not found")
)

Functions

func GetImportPaths added in v0.2.5

func GetImportPaths(protoFiles []*domain.ProtoFile, files []string) ([]string, []string)

func ProtoFilesFromDisk

func ProtoFilesFromDisk(importPaths, filenames []string) (*protoregistry.Files, error)

func ProtoFilesFromReflectionAPI

func ProtoFilesFromReflectionAPI(ctx context.Context, conn *grpc.ClientConn) (*protoregistry.Files, error)

Types

type Response

type Response struct {
	Body       string
	Metadata   []domain.KeyValue
	Trailers   []domain.KeyValue
	TimePassed time.Duration
	Size       int
	Error      error

	StatueCode int
	Status     string
}

type Service

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

func NewService

func NewService(requests *state.Requests, envs *state.Environments, protoFiles *state.ProtoFiles) *Service

func (*Service) Dial

func (s *Service) Dial(req *domain.GRPCRequestSpec) (*grpc.ClientConn, error)

func (*Service) GetRequestStruct

func (s *Service) GetRequestStruct(id, environmentID string) (string, error)

func (*Service) GetServices

func (s *Service) GetServices(id, activeEnvironmentID string) ([]domain.GRPCService, error)

func (*Service) Invoke

func (s *Service) Invoke(id, activeEnvironmentID string) (*Response, error)

Jump to

Keyboard shortcuts

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