cntr

package
v0.0.0-...-70b8fbd Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Service_name = map[int32]string{
		0: "ST_UNSPECIFIED",
		1: "ST_GNMI",
		2: "ST_GRIBI",
	}
	Service_value = map[string]int32{
		"ST_UNSPECIFIED": 0,
		"ST_GNMI":        1,
		"ST_GRIBI":       2,
	}
)

Enum value maps for Service.

View Source
var Cntr_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "openconfig.featureprofiles.cntr.Cntr",
	HandlerType: (*CntrServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Dial",
			Handler:    _Cntr_Dial_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _Cntr_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cntr.proto",
}

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

Functions

func RegisterCntrServer

func RegisterCntrServer(s grpc.ServiceRegistrar, srv CntrServer)

Types

type CntrClient

type CntrClient interface {
	// Dial instructs the container to dial the target specified in the
	// DialRequest message.
	Dial(ctx context.Context, in *DialRequest, opts ...grpc.CallOption) (*DialResponse, error)
	// Ping provides a means for a container to respond to an external gRPC probe.
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}

CntrClient is the client API for Cntr 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 NewCntrClient

func NewCntrClient(cc grpc.ClientConnInterface) CntrClient

type CntrServer

type CntrServer interface {
	// Dial instructs the container to dial the target specified in the
	// DialRequest message.
	Dial(context.Context, *DialRequest) (*DialResponse, error)
	// Ping provides a means for a container to respond to an external gRPC probe.
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	// contains filtered or unexported methods
}

CntrServer is the server API for Cntr service. All implementations must embed UnimplementedCntrServer for forward compatibility

type DialRequest

type DialRequest struct {

	// Address for the container to dial.
	Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	// Types that are assignable to Request:
	//	*DialRequest_Ping
	//	*DialRequest_Srv
	Request isDialRequest_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

func (*DialRequest) Descriptor deprecated

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

Deprecated: Use DialRequest.ProtoReflect.Descriptor instead.

func (*DialRequest) GetAddr

func (x *DialRequest) GetAddr() string

func (*DialRequest) GetPing

func (x *DialRequest) GetPing() *PingRequest

func (*DialRequest) GetRequest

func (m *DialRequest) GetRequest() isDialRequest_Request

func (*DialRequest) GetSrv

func (x *DialRequest) GetSrv() Service

func (*DialRequest) ProtoMessage

func (*DialRequest) ProtoMessage()

func (*DialRequest) ProtoReflect

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

func (*DialRequest) Reset

func (x *DialRequest) Reset()

func (*DialRequest) String

func (x *DialRequest) String() string

type DialRequest_Ping

type DialRequest_Ping struct {
	// The payload of a PingRequest, if specified, the container dials and then
	// uses the Ping RPC to send a request.
	Ping *PingRequest `protobuf:"bytes,2,opt,name=ping,proto3,oneof"`
}

type DialRequest_Srv

type DialRequest_Srv struct {
	// Service to be initiated towards the target.
	Srv Service `protobuf:"varint,3,opt,name=srv,proto3,enum=openconfig.featureprofiles.cntr.Service,oneof"`
}

type DialResponse

type DialResponse struct {

	// Types that are assignable to Response:
	//	*DialResponse_Pong
	//	*DialResponse_GribiResponse
	//	*DialResponse_GnmiResponse
	Response isDialResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

func (*DialResponse) Descriptor deprecated

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

Deprecated: Use DialResponse.ProtoReflect.Descriptor instead.

func (*DialResponse) GetGnmiResponse

func (x *DialResponse) GetGnmiResponse() *anypb.Any

func (*DialResponse) GetGribiResponse

func (x *DialResponse) GetGribiResponse() *anypb.Any

func (*DialResponse) GetPong

func (x *DialResponse) GetPong() *PingResponse

func (*DialResponse) GetResponse

func (m *DialResponse) GetResponse() isDialResponse_Response

func (*DialResponse) ProtoMessage

func (*DialResponse) ProtoMessage()

func (*DialResponse) ProtoReflect

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

func (*DialResponse) Reset

func (x *DialResponse) Reset()

func (*DialResponse) String

func (x *DialResponse) String() string

type DialResponse_GnmiResponse

type DialResponse_GnmiResponse struct {
	// The gNMI message sent in response to the gNMI Capabilities RPC. Populated
	// only when the Service in the request is set to GNMI.
	GnmiResponse *anypb.Any `protobuf:"bytes,4,opt,name=gnmi_response,json=gnmiResponse,proto3,oneof"`
}

type DialResponse_GribiResponse

type DialResponse_GribiResponse struct {
	// The gRIBI message sent in response to the gRIBI Get RPC. Contains only
	// the first message, and is populated only when the Service in the request
	// is set to GRIBI.
	GribiResponse *anypb.Any `protobuf:"bytes,3,opt,name=gribi_response,json=gribiResponse,proto3,oneof"`
}

type DialResponse_Pong

type DialResponse_Pong struct {
	// The ping response returned from the remote system, populated when the
	// request specifies a PingRequest.
	Pong *PingResponse `protobuf:"bytes,2,opt,name=pong,proto3,oneof"`
}

type PingRequest

type PingRequest struct {
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PingResponse

type PingResponse struct {

	// Timestamp at which the ping response was sent.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetTimestamp

func (x *PingResponse) GetTimestamp() *timestamppb.Timestamp

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect

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

func (*PingResponse) Reset

func (x *PingResponse) Reset()

func (*PingResponse) String

func (x *PingResponse) String() string

type Service

type Service int32

Service enumerates the services that the dialler can connect to in an RPC-content-aware manner.

const (
	Service_ST_UNSPECIFIED Service = 0
	// gNMI indicates that a gNMI check should be initiated, particularly the
	// Capabilities RPC should be sent to the target.
	Service_ST_GNMI Service = 1
	// gRIBI indictes that gRIBI check should be initiated, particularly the
	// Get RPC should be sent to the target.
	Service_ST_GRIBI Service = 2
)

func (Service) Descriptor

func (Service) Descriptor() protoreflect.EnumDescriptor

func (Service) Enum

func (x Service) Enum() *Service

func (Service) EnumDescriptor deprecated

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

Deprecated: Use Service.Descriptor instead.

func (Service) Number

func (x Service) Number() protoreflect.EnumNumber

func (Service) String

func (x Service) String() string

func (Service) Type

func (Service) Type() protoreflect.EnumType

type UnimplementedCntrServer

type UnimplementedCntrServer struct {
}

UnimplementedCntrServer must be embedded to have forward compatible implementations.

func (UnimplementedCntrServer) Dial

func (UnimplementedCntrServer) Ping

type UnsafeCntrServer

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

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

Jump to

Keyboard shortcuts

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