schema

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP = "http"
	GRPC = "grpc"
	WS   = "ws"
	TCP  = "tcp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Schema

type Schema struct {
	Protocol string
	Bind     string
}

Schema defines server protocol

func NewGRPCSchema

func NewGRPCSchema(bind string) Schema

func NewHttpSchema

func NewHttpSchema(bind string) Schema

func NewSchema

func NewSchema(protocol string, bind string) Schema

func NewTCPSchema

func NewTCPSchema(bind string) Schema

func NewWSSchema

func NewWSSchema(bind string) Schema

func (Schema) Address

func (s Schema) Address() string

Address returns address of schema.

func (Schema) HostPort

func (s Schema) HostPort() (string, string, error)

HostPort returns the host and port of the schema.

Jump to

Keyboard shortcuts

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