Documentation
¶
Index ¶
- func NewGRPCAddress(addr Address) *grpc.Address
- func NewGRPCDomainRecord(domainRecord DomainRecord) *grpc.DomainRecord
- func NewGRPCDomainRecordList(domainRecords []DomainRecord) []*grpc.DomainRecord
- func NewGRPCIdentity(ident Identity) *grpc.Identity
- func NewGRPCIdentityList(dIdents []Identity) []*grpc.Identity
- func NewGRPCServiceIdentity(sIdent ServiceIdentity) *grpc.ServiceIdentity
- func NewGRPCServiceIdentityList(sIdents []ServiceIdentity) []*grpc.ServiceIdentity
- type Address
- type DomainRecord
- type Identity
- type ServiceIdentity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCAddress ¶
NewGRPCAddress creates a grcp.ServiceIdentity from a Address
func NewGRPCDomainRecord ¶
func NewGRPCDomainRecord(domainRecord DomainRecord) *grpc.DomainRecord
func NewGRPCDomainRecordList ¶
func NewGRPCDomainRecordList(domainRecords []DomainRecord) []*grpc.DomainRecord
func NewGRPCIdentity ¶
NewGRPCIdentity creates a grcp.ServiceIdentity from a Identity
func NewGRPCIdentityList ¶
NewGRPCIdentityList creates a list of new Identitys from a list of grpc.Identity
func NewGRPCServiceIdentity ¶
func NewGRPCServiceIdentity(sIdent ServiceIdentity) *grpc.ServiceIdentity
NewGRPCServiceIdentity creates a grpc.ServiceIdentity from a ServiceIdentity
func NewGRPCServiceIdentityList ¶
func NewGRPCServiceIdentityList(sIdents []ServiceIdentity) []*grpc.ServiceIdentity
NewGRPCServiceIdentityList creates a list of new ServiceIdentitys from a list of grpc.ServiceIdentity
Types ¶
type Address ¶
type Address struct {
// IP is the ip which the Domain will be responding on
IP net.IP
// Port is the port which the Domain will be responding on
Port int
}
Address is a IP and port combination
func NewAddress ¶
NewAddress creates a Address from a grcp.Address
type DomainRecord ¶
type DomainRecord struct {
// Identity holds the identifying information of the domain
Identity
// Services
Services []ServiceIdentity
}
func NewDomainRecord ¶
func NewDomainRecord(grpcDomainRecord *grpc.DomainRecord) (DomainRecord, error)
func NewDomainRecordList ¶
func NewDomainRecordList(grpcDomainRecords []*grpc.DomainRecord) ([]DomainRecord, error)
type Identity ¶
type Identity struct {
// ID is a unique identifier
ID uuid.UUID
// Version is the version of code being run
Version semver.Version
// Address is a network address
Address Address
}
Identity is a set of identifying information
func NewIdentity ¶
NewIdentity creates a Identity from a grcp.Identity
func NewIdentityList ¶
NewIdentityList creates a list of new Identitys from a list of grpc.Identity
type ServiceIdentity ¶
type ServiceIdentity struct {
// Identity holds identifying information
Identity
// Type is the type of the service
Type string
}
ServiceIdentity represents a service running under a domain
func NewServiceIdentity ¶
func NewServiceIdentity(grpcSIdent *grpc.ServiceIdentity) (ServiceIdentity, error)
NewServiceIdentity creates a ServiceIdentity from a grpc.ServiceIdentity
func NewServiceIdentityList ¶
func NewServiceIdentityList(grpcSIdents []*grpc.ServiceIdentity) ([]ServiceIdentity, error)
NewServiceIdentityList creates a list of new ServiceIdentitys from a list of grpc.ServiceIdentity
func (ServiceIdentity) String ¶
func (i ServiceIdentity) String() string