Documentation ¶
Index ¶
- type Endpoint
- type Key
- type Record
- func (s *Record) CreateRecord() *Record
- func (s *Record) Get(key Key) Endpoint
- func (s *Record) Marshal() ([]byte, error)
- func (s *Record) MarshalJSON() ([]byte, error)
- func (s *Record) String() string
- func (s *Record) ToProto() *pb.ServiceMap
- func (s *Record) UnmarshalJSON(b []byte) error
- func (s *Record) Update(key Key, network string, port int)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record defines the mapping between a service ID and its tuple TypePort e.g., map[autopeering:&{TCP, 8000}].
func FromProto ¶
func FromProto(in *pb.ServiceMap) (*Record, error)
FromProto creates a Record from the provided protobuf struct.
func (*Record) CreateRecord ¶
CreateRecord creates a modifyable Record from the services.
func (*Record) MarshalJSON ¶
MarshalJSON serializes Record struct into JSON data.
func (*Record) ToProto ¶
func (s *Record) ToProto() *pb.ServiceMap
ToProto returns the corresponding protobuf struct.
func (*Record) UnmarshalJSON ¶
UnmarshalJSON deserializes JSON data into Record struct.
Click to show internal directories.
Click to hide internal directories.