grpcweb

package
v0.0.0-...-c99e9fc Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Cert string `json:"cert" env:"GRPCWEB_CERT"`
	Key  string `json:"key" env:"GRPCWEB_KEY"`

	ConnectionTimeout uint `json:"connection_timeout" env:"GRPCWEB_CONNECTION_TIMEOUT"`
	NumStreamWorkers  uint `json:"num_stream_workers" env:"GRPCWEB_NUM_STREAM_WORKERS"`
	MaxRecvMsgSize    uint `json:"max_recv_msg_size" env:"GRPCWEB_MAX_RECV_MSG_SIZE"`

	WebSocket bool `json:"web_socket" env:"GRPCWEB_WEB_SOCKET"`

	Origin map[string]interface{} `json:"origin" env:"GRPCWEB_ORIGIN"`

	ForceStop bool `json:"force_stop" env:"FORCE_STOP"`
}

Config is grpc service config.

type ErrUninitialized

type ErrUninitialized struct{}

ErrUninitialized is raised when grpc service serve after wrong/no dial.

func (ErrUninitialized) Error

func (err ErrUninitialized) Error() string

Error implementation for ErrUninitialized.

type Service

type Service struct {
	Register func()

	*grpc.Server
	*grpcweb.WrappedGrpcServer
	// contains filtered or unexported fields
}

Service embed a connected redis client.

func (*Service) Close

func (s *Service) Close(ctx context.Context) error

func (*Service) Dial

func (s *Service) Dial(ctx context.Context, cfg Config) error

Dial connects client to external redis service.

Jump to

Keyboard shortcuts

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