svctype

package
v0.0.0-...-7baeb4b Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidServiceTypeStringError

type InvalidServiceTypeStringError struct {
	String string
}

InvalidServiceTypeStringError is returned when a string is not parsable to a ServiceType.

func (InvalidServiceTypeStringError) Error

type ServiceType

type ServiceType int

ServiceType describes what protocol the service supports.

const (
	// ServiceUnknown is the default, useless value for ServiceType.
	ServiceUnknown ServiceType = iota
	// ServiceHTTP indicates the service should run an HTTP server.
	ServiceHTTP
	// ServiceGRPC indicates the service should run a GRPC server.
	ServiceGRPC
)

func FromString

func FromString(s string) (t ServiceType, err error)

FromString converts a string to a ServiceType.

func (ServiceType) MarshalJSON

func (t ServiceType) MarshalJSON() ([]byte, error)

MarshalJSON encodes the ServiceType as a JSON string.

func (ServiceType) String

func (t ServiceType) String() (s string)

func (*ServiceType) UnmarshalJSON

func (t *ServiceType) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON converts a JSON string to a ServiceType.

Jump to

Keyboard shortcuts

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