dns

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDns        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDns          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDns = fmt.Errorf("proto: unexpected end of group")
)

Functions

func NewDnsEndpoints

func NewDnsEndpoints() []*api.Endpoint

Api Endpoints for Dns service

func RegisterDnsHandler

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

func RegisterDnsServer

func RegisterDnsServer(s *grpc.Server, srv DnsServer)

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"`
}

func (*AdvertiseRequest) Descriptor

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

func (*AdvertiseRequest) GetRecords

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

func (*AdvertiseRequest) Marshal

func (m *AdvertiseRequest) Marshal() (dAtA []byte, err error)

func (*AdvertiseRequest) MarshalTo

func (m *AdvertiseRequest) MarshalTo(dAtA []byte) (int, error)

func (*AdvertiseRequest) MarshalToSizedBuffer

func (m *AdvertiseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AdvertiseRequest) ProtoMessage

func (*AdvertiseRequest) ProtoMessage()

func (*AdvertiseRequest) Reset

func (m *AdvertiseRequest) Reset()

func (*AdvertiseRequest) Size

func (m *AdvertiseRequest) Size() (n int)

func (*AdvertiseRequest) String

func (m *AdvertiseRequest) String() string

func (*AdvertiseRequest) Unmarshal

func (m *AdvertiseRequest) Unmarshal(dAtA []byte) error

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 {
}

func (*AdvertiseResponse) Descriptor

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

func (*AdvertiseResponse) Marshal

func (m *AdvertiseResponse) Marshal() (dAtA []byte, err error)

func (*AdvertiseResponse) MarshalTo

func (m *AdvertiseResponse) MarshalTo(dAtA []byte) (int, error)

func (*AdvertiseResponse) MarshalToSizedBuffer

func (m *AdvertiseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AdvertiseResponse) ProtoMessage

func (*AdvertiseResponse) ProtoMessage()

func (*AdvertiseResponse) Reset

func (m *AdvertiseResponse) Reset()

func (*AdvertiseResponse) Size

func (m *AdvertiseResponse) Size() (n int)

func (*AdvertiseResponse) String

func (m *AdvertiseResponse) String() string

func (*AdvertiseResponse) Unmarshal

func (m *AdvertiseResponse) Unmarshal(dAtA []byte) error

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 DnsClient

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

DnsClient is the client API for Dns service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDnsClient

func NewDnsClient(cc *grpc.ClientConn) DnsClient

type DnsHandler

Server API for Dns service

type DnsServer

DnsServer is the server API for Dns service.

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)
}

Client API for Dns service

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"`
}

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) Marshal

func (m *Record) Marshal() (dAtA []byte, err error)

func (*Record) MarshalTo

func (m *Record) MarshalTo(dAtA []byte) (int, error)

func (*Record) MarshalToSizedBuffer

func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) Size

func (m *Record) Size() (n int)

func (*Record) String

func (m *Record) String() string

func (*Record) Unmarshal

func (m *Record) Unmarshal(dAtA []byte) error

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"`
}

func (*RemoveRequest) Descriptor

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

func (*RemoveRequest) GetRecords

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

func (*RemoveRequest) Marshal

func (m *RemoveRequest) Marshal() (dAtA []byte, err error)

func (*RemoveRequest) MarshalTo

func (m *RemoveRequest) MarshalTo(dAtA []byte) (int, error)

func (*RemoveRequest) MarshalToSizedBuffer

func (m *RemoveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) Size

func (m *RemoveRequest) Size() (n int)

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

func (*RemoveRequest) Unmarshal

func (m *RemoveRequest) Unmarshal(dAtA []byte) error

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 {
}

func (*RemoveResponse) Descriptor

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

func (*RemoveResponse) Marshal

func (m *RemoveResponse) Marshal() (dAtA []byte, err error)

func (*RemoveResponse) MarshalTo

func (m *RemoveResponse) MarshalTo(dAtA []byte) (int, error)

func (*RemoveResponse) MarshalToSizedBuffer

func (m *RemoveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RemoveResponse) ProtoMessage

func (*RemoveResponse) ProtoMessage()

func (*RemoveResponse) Reset

func (m *RemoveResponse) Reset()

func (*RemoveResponse) Size

func (m *RemoveResponse) Size() (n int)

func (*RemoveResponse) String

func (m *RemoveResponse) String() string

func (*RemoveResponse) Unmarshal

func (m *RemoveResponse) Unmarshal(dAtA []byte) error

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"`
}

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) Marshal

func (m *ResolveRequest) Marshal() (dAtA []byte, err error)

func (*ResolveRequest) MarshalTo

func (m *ResolveRequest) MarshalTo(dAtA []byte) (int, error)

func (*ResolveRequest) MarshalToSizedBuffer

func (m *ResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResolveRequest) ProtoMessage

func (*ResolveRequest) ProtoMessage()

func (*ResolveRequest) Reset

func (m *ResolveRequest) Reset()

func (*ResolveRequest) Size

func (m *ResolveRequest) Size() (n int)

func (*ResolveRequest) String

func (m *ResolveRequest) String() string

func (*ResolveRequest) Unmarshal

func (m *ResolveRequest) Unmarshal(dAtA []byte) error

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"`
}

func (*ResolveResponse) Descriptor

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

func (*ResolveResponse) GetRecords

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

func (*ResolveResponse) Marshal

func (m *ResolveResponse) Marshal() (dAtA []byte, err error)

func (*ResolveResponse) MarshalTo

func (m *ResolveResponse) MarshalTo(dAtA []byte) (int, error)

func (*ResolveResponse) MarshalToSizedBuffer

func (m *ResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResolveResponse) ProtoMessage

func (*ResolveResponse) ProtoMessage()

func (*ResolveResponse) Reset

func (m *ResolveResponse) Reset()

func (*ResolveResponse) Size

func (m *ResolveResponse) Size() (n int)

func (*ResolveResponse) String

func (m *ResolveResponse) String() string

func (*ResolveResponse) Unmarshal

func (m *ResolveResponse) Unmarshal(dAtA []byte) error

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

type UnimplementedDnsServer

type UnimplementedDnsServer struct {
}

UnimplementedDnsServer can be embedded to have forward compatible implementations.

func (*UnimplementedDnsServer) Advertise

func (*UnimplementedDnsServer) Remove

func (*UnimplementedDnsServer) Resolve

Jump to

Keyboard shortcuts

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