pbdns

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Protocol_name = map[int32]string{
		0: "PROTOCOL_UNSET_UNSPECIFIED",
		1: "PROTOCOL_TCP",
		2: "PROTOCOL_UDP",
	}
	Protocol_value = map[string]int32{
		"PROTOCOL_UNSET_UNSPECIFIED": 0,
		"PROTOCOL_TCP":               1,
		"PROTOCOL_UDP":               2,
	}
)

Enum value maps for Protocol.

View Source
var DNSService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hashicorp.consul.dns.DNSService",
	HandlerType: (*DNSServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Query",
			Handler:    _DNSService_Query_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pbdns/dns.proto",
}

DNSService_ServiceDesc is the grpc.ServiceDesc for DNSService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_pbdns_dns_proto protoreflect.FileDescriptor

Functions

func RegisterDNSServiceServer

func RegisterDNSServiceServer(s grpc.ServiceRegistrar, srv DNSServiceServer)

Types

type DNSServiceClient

type DNSServiceClient interface {
	// Query sends a DNS request over to Consul server and returns a DNS reply message.
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
}

DNSServiceClient is the client API for DNSService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDNSServiceClient

func NewDNSServiceClient(cc grpc.ClientConnInterface) DNSServiceClient

type DNSServiceServer

type DNSServiceServer interface {
	// Query sends a DNS request over to Consul server and returns a DNS reply message.
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
}

DNSServiceServer is the server API for DNSService service. All implementations should embed UnimplementedDNSServiceServer for forward compatibility

type MockDNSServiceClient

type MockDNSServiceClient struct {
	mock.Mock
}

MockDNSServiceClient is an autogenerated mock type for the DNSServiceClient type

func NewMockDNSServiceClient

func NewMockDNSServiceClient(t mockConstructorTestingTNewMockDNSServiceClient) *MockDNSServiceClient

NewMockDNSServiceClient creates a new instance of MockDNSServiceClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockDNSServiceClient) Query

Query provides a mock function with given fields: ctx, in, opts

type MockDNSServiceServer

type MockDNSServiceServer struct {
	mock.Mock
}

MockDNSServiceServer is an autogenerated mock type for the DNSServiceServer type

func NewMockDNSServiceServer

func NewMockDNSServiceServer(t mockConstructorTestingTNewMockDNSServiceServer) *MockDNSServiceServer

NewMockDNSServiceServer creates a new instance of MockDNSServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockDNSServiceServer) Query

Query provides a mock function with given fields: _a0, _a1

type MockUnsafeDNSServiceServer

type MockUnsafeDNSServiceServer struct {
	mock.Mock
}

MockUnsafeDNSServiceServer is an autogenerated mock type for the UnsafeDNSServiceServer type

func NewMockUnsafeDNSServiceServer

func NewMockUnsafeDNSServiceServer(t mockConstructorTestingTNewMockUnsafeDNSServiceServer) *MockUnsafeDNSServiceServer

NewMockUnsafeDNSServiceServer creates a new instance of MockUnsafeDNSServiceServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

type Protocol

type Protocol int32
const (
	Protocol_PROTOCOL_UNSET_UNSPECIFIED Protocol = 0
	Protocol_PROTOCOL_TCP               Protocol = 1
	Protocol_PROTOCOL_UDP               Protocol = 2
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

func (Protocol) EnumDescriptor() ([]byte, []int)

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

type QueryRequest

type QueryRequest struct {

	// msg is the DNS request message.
	Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// protocol is the protocol of the request
	Protocol Protocol `protobuf:"varint,2,opt,name=protocol,proto3,enum=hashicorp.consul.dns.Protocol" json:"protocol,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRequest) Descriptor deprecated

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetMsg

func (x *QueryRequest) GetMsg() []byte

func (*QueryRequest) GetProtocol

func (x *QueryRequest) GetProtocol() Protocol

func (*QueryRequest) MarshalBinary

func (msg *QueryRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

func (x *QueryRequest) ProtoReflect() protoreflect.Message

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

func (*QueryRequest) UnmarshalBinary

func (msg *QueryRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type QueryResponse

type QueryResponse struct {

	// msg is the DNS reply message.
	Msg []byte `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetMsg

func (x *QueryResponse) GetMsg() []byte

func (*QueryResponse) MarshalBinary

func (msg *QueryResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

func (*QueryResponse) UnmarshalBinary

func (msg *QueryResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type UnimplementedDNSServiceServer

type UnimplementedDNSServiceServer struct {
}

UnimplementedDNSServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDNSServiceServer) Query

type UnsafeDNSServiceServer

type UnsafeDNSServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDNSServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DNSServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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