go_micro_network_dns

package
v0.0.0-...-f47e464 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDnsHandler

func RegisterDnsHandler(s server.Server, hdlr DnsHandler, opts ...server.HandlerOption) error

Types

type AdvertiseRequest

type AdvertiseRequest struct {
	// Send an arbitrary number of records to advertise
	Records              []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*AdvertiseRequest) Descriptor

func (*AdvertiseRequest) Descriptor() ([]byte, []int)

func (*AdvertiseRequest) GetRecords

func (m *AdvertiseRequest) GetRecords() []*Record

func (*AdvertiseRequest) ProtoMessage

func (*AdvertiseRequest) ProtoMessage()

func (*AdvertiseRequest) Reset

func (m *AdvertiseRequest) Reset()

func (*AdvertiseRequest) String

func (m *AdvertiseRequest) String() string

func (*AdvertiseRequest) XXX_DiscardUnknown

func (m *AdvertiseRequest) XXX_DiscardUnknown()

func (*AdvertiseRequest) XXX_Marshal

func (m *AdvertiseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AdvertiseRequest) XXX_Merge

func (m *AdvertiseRequest) XXX_Merge(src proto.Message)

func (*AdvertiseRequest) XXX_Size

func (m *AdvertiseRequest) XXX_Size() int

func (*AdvertiseRequest) XXX_Unmarshal

func (m *AdvertiseRequest) XXX_Unmarshal(b []byte) error

type AdvertiseResponse

type AdvertiseResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AdvertiseResponse) Descriptor

func (*AdvertiseResponse) Descriptor() ([]byte, []int)

func (*AdvertiseResponse) ProtoMessage

func (*AdvertiseResponse) ProtoMessage()

func (*AdvertiseResponse) Reset

func (m *AdvertiseResponse) Reset()

func (*AdvertiseResponse) String

func (m *AdvertiseResponse) String() string

func (*AdvertiseResponse) XXX_DiscardUnknown

func (m *AdvertiseResponse) XXX_DiscardUnknown()

func (*AdvertiseResponse) XXX_Marshal

func (m *AdvertiseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AdvertiseResponse) XXX_Merge

func (m *AdvertiseResponse) XXX_Merge(src proto.Message)

func (*AdvertiseResponse) XXX_Size

func (m *AdvertiseResponse) XXX_Size() int

func (*AdvertiseResponse) XXX_Unmarshal

func (m *AdvertiseResponse) XXX_Unmarshal(b []byte) error

type DnsService

type DnsService interface {
	Advertise(ctx context.Context, in *AdvertiseRequest, opts ...client.CallOption) (*AdvertiseResponse, error)
	Remove(ctx context.Context, in *RemoveRequest, opts ...client.CallOption) (*RemoveResponse, error)
	Resolve(ctx context.Context, in *ResolveRequest, opts ...client.CallOption) (*ResolveResponse, error)
}

func NewDnsService

func NewDnsService(name string, c client.Client) DnsService

type Record

type Record struct {
	// e.g. example.com
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// e.g. 127.0.0.1
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// e.g. A, AAAA, TXT, SRV, ...
	Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// MX and SRV records have priority
	Priority uint32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
	// TTL
	Ttl                  uint32   `protobuf:"varint,5,opt,name=ttl,proto3" json:"ttl,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Define a message to register a DNS record

func (*Record) Descriptor

func (*Record) Descriptor() ([]byte, []int)

func (*Record) GetName

func (m *Record) GetName() string

func (*Record) GetPriority

func (m *Record) GetPriority() uint32

func (*Record) GetTtl

func (m *Record) GetTtl() uint32

func (*Record) GetType

func (m *Record) GetType() string

func (*Record) GetValue

func (m *Record) GetValue() string

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) String

func (m *Record) String() string

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type RemoveRequest

type RemoveRequest struct {
	// Send an arbitrary number of records to remove
	Records              []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*RemoveRequest) Descriptor

func (*RemoveRequest) Descriptor() ([]byte, []int)

func (*RemoveRequest) GetRecords

func (m *RemoveRequest) GetRecords() []*Record

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

func (*RemoveRequest) XXX_DiscardUnknown

func (m *RemoveRequest) XXX_DiscardUnknown()

func (*RemoveRequest) XXX_Marshal

func (m *RemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveRequest) XXX_Merge

func (m *RemoveRequest) XXX_Merge(src proto.Message)

func (*RemoveRequest) XXX_Size

func (m *RemoveRequest) XXX_Size() int

func (*RemoveRequest) XXX_Unmarshal

func (m *RemoveRequest) XXX_Unmarshal(b []byte) error

type RemoveResponse

type RemoveResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RemoveResponse) Descriptor

func (*RemoveResponse) Descriptor() ([]byte, []int)

func (*RemoveResponse) ProtoMessage

func (*RemoveResponse) ProtoMessage()

func (*RemoveResponse) Reset

func (m *RemoveResponse) Reset()

func (*RemoveResponse) String

func (m *RemoveResponse) String() string

func (*RemoveResponse) XXX_DiscardUnknown

func (m *RemoveResponse) XXX_DiscardUnknown()

func (*RemoveResponse) XXX_Marshal

func (m *RemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveResponse) XXX_Merge

func (m *RemoveResponse) XXX_Merge(src proto.Message)

func (*RemoveResponse) XXX_Size

func (m *RemoveResponse) XXX_Size() int

func (*RemoveResponse) XXX_Unmarshal

func (m *RemoveResponse) XXX_Unmarshal(b []byte) error

type ResolveRequest

type ResolveRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ResolveRequest) Descriptor

func (*ResolveRequest) Descriptor() ([]byte, []int)

func (*ResolveRequest) GetName

func (m *ResolveRequest) GetName() string

func (*ResolveRequest) GetType

func (m *ResolveRequest) GetType() string

func (*ResolveRequest) ProtoMessage

func (*ResolveRequest) ProtoMessage()

func (*ResolveRequest) Reset

func (m *ResolveRequest) Reset()

func (*ResolveRequest) String

func (m *ResolveRequest) String() string

func (*ResolveRequest) XXX_DiscardUnknown

func (m *ResolveRequest) XXX_DiscardUnknown()

func (*ResolveRequest) XXX_Marshal

func (m *ResolveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResolveRequest) XXX_Merge

func (m *ResolveRequest) XXX_Merge(src proto.Message)

func (*ResolveRequest) XXX_Size

func (m *ResolveRequest) XXX_Size() int

func (*ResolveRequest) XXX_Unmarshal

func (m *ResolveRequest) XXX_Unmarshal(b []byte) error

type ResolveResponse

type ResolveResponse struct {
	// Return any matching records
	Records              []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*ResolveResponse) Descriptor

func (*ResolveResponse) Descriptor() ([]byte, []int)

func (*ResolveResponse) GetRecords

func (m *ResolveResponse) GetRecords() []*Record

func (*ResolveResponse) ProtoMessage

func (*ResolveResponse) ProtoMessage()

func (*ResolveResponse) Reset

func (m *ResolveResponse) Reset()

func (*ResolveResponse) String

func (m *ResolveResponse) String() string

func (*ResolveResponse) XXX_DiscardUnknown

func (m *ResolveResponse) XXX_DiscardUnknown()

func (*ResolveResponse) XXX_Marshal

func (m *ResolveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResolveResponse) XXX_Merge

func (m *ResolveResponse) XXX_Merge(src proto.Message)

func (*ResolveResponse) XXX_Size

func (m *ResolveResponse) XXX_Size() int

func (*ResolveResponse) XXX_Unmarshal

func (m *ResolveResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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