grpc

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package grpc implements the functions, types, and interfaces for the module.

Package grpc implements the functions, types, and interfaces for the module.

Index

Constants

View Source
const (
	Scheme   = "grpc"
	HostName = "ORIGADMIN_RUNTIME_SERVICE_GRPC_HOST"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, cfg *configv1.Service, ss ...OptionSetting) (*grpc.ClientConn, error)

NewClient Creating a GRPC client instance

func NewServer

func NewServer(cfg *configv1.Service, ss ...OptionSetting) (*transgrpc.Server, error)

NewServer Create a GRPC server instance

Types

type Option added in v0.1.0

type Option struct {
	Config       *configv1.Service
	ServiceName  string
	Discovery    registry.Discovery
	NodeFilters  []selector.NodeFilter
	Middlewares  []middleware.Middleware
	EndpointFunc func(scheme string, host string, addr string) (string, error)
}

type OptionSetting added in v0.1.0

type OptionSetting = func(o *Option)

func WithNodeFilter added in v0.1.0

func WithNodeFilter(filters ...selector.NodeFilter) OptionSetting

Jump to

Keyboard shortcuts

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