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 ¶
func (e InvalidServiceTypeStringError) Error() string
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.
Click to show internal directories.
Click to hide internal directories.