Documentation ¶
Index ¶
- Variables
- func RegisterDNSServiceServer(s grpc.ServiceRegistrar, srv DNSServiceServer)
- type DNSServiceClient
- type DNSServiceServer
- type MockDNSServiceClient
- type MockDNSServiceServer
- type MockUnsafeDNSServiceServer
- type Protocol
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetMsg() []byte
- func (x *QueryRequest) GetProtocol() Protocol
- func (msg *QueryRequest) MarshalBinary() ([]byte, error)
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- func (msg *QueryRequest) UnmarshalBinary(b []byte) error
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryResponse) GetMsg() []byte
- func (msg *QueryResponse) MarshalBinary() ([]byte, error)
- func (*QueryResponse) ProtoMessage()
- func (x *QueryResponse) ProtoReflect() protoreflect.Message
- func (x *QueryResponse) Reset()
- func (x *QueryResponse) String() string
- func (msg *QueryResponse) UnmarshalBinary(b []byte) error
- type UnimplementedDNSServiceServer
- type UnsafeDNSServiceServer
Constants ¶
This section is empty.
Variables ¶
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.
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)
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 ¶
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 ¶
func (_m *MockDNSServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
Query provides a mock function with given fields: ctx, in, opts
type MockDNSServiceServer ¶
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 ¶
func (_m *MockDNSServiceServer) Query(_a0 context.Context, _a1 *QueryRequest) (*QueryResponse, error)
Query provides a mock function with given fields: _a0, _a1
type MockUnsafeDNSServiceServer ¶
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
func (Protocol) Descriptor ¶
func (Protocol) Descriptor() protoreflect.EnumDescriptor
func (Protocol) EnumDescriptor
deprecated
func (Protocol) Number ¶
func (x Protocol) Number() protoreflect.EnumNumber
func (Protocol) Type ¶
func (Protocol) Type() protoreflect.EnumType
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 ¶
func (UnimplementedDNSServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
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.