v1

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stream_Connect_FullMethodName = "/stream.Stream/Connect"
	Stream_Notify_FullMethodName  = "/stream.Stream/Notify"
)
View Source
const (
	Delegate_Request_FullMethodName   = "/stream.Delegate/Request"
	Delegate_Broadcast_FullMethodName = "/stream.Delegate/Broadcast"
)

Variables

View Source
var (
	EventType_name = map[int32]string{
		0: "Unknown",
		1: "DiscoveryComplete",
	}
	EventType_value = map[string]int32{
		"Unknown":           0,
		"DiscoveryComplete": 1,
	}
)

Enum value maps for EventType.

View Source
var Delegate_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stream.Delegate",
	HandlerType: (*DelegateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Request",
			Handler:    _Delegate_Request_Handler,
		},
		{
			MethodName: "Broadcast",
			Handler:    _Delegate_Broadcast_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/stream/v1/stream.proto",
}

Delegate_ServiceDesc is the grpc.ServiceDesc for Delegate 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_github_com_rancher_opni_pkg_apis_stream_v1_stream_proto protoreflect.FileDescriptor
View Source
var Stream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stream.Stream",
	HandlerType: (*StreamServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Notify",
			Handler:    _Stream_Notify_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Connect",
			Handler:       _Stream_Connect_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "github.com/rancher/opni/pkg/apis/stream/v1/stream.proto",
}

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

Functions

func RegisterDelegateServer added in v0.8.2

func RegisterDelegateServer(s grpc.ServiceRegistrar, srv DelegateServer)

func RegisterStreamServer

func RegisterStreamServer(s grpc.ServiceRegistrar, srv StreamServer)

Types

type BroadcastMessage added in v0.8.2

type BroadcastMessage struct {
	Request        *totem.RPC          `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	TargetSelector *v1.ClusterSelector `protobuf:"bytes,2,opt,name=targetSelector,proto3" json:"targetSelector,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastMessage) Descriptor deprecated added in v0.8.2

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

Deprecated: Use BroadcastMessage.ProtoReflect.Descriptor instead.

func (*BroadcastMessage) GetRequest added in v0.8.2

func (x *BroadcastMessage) GetRequest() *totem.RPC

func (*BroadcastMessage) GetTargetSelector added in v0.8.2

func (x *BroadcastMessage) GetTargetSelector() *v1.ClusterSelector

func (*BroadcastMessage) ProtoMessage added in v0.8.2

func (*BroadcastMessage) ProtoMessage()

func (*BroadcastMessage) ProtoReflect added in v0.8.2

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

func (*BroadcastMessage) Reset added in v0.8.2

func (x *BroadcastMessage) Reset()

func (*BroadcastMessage) String added in v0.8.2

func (x *BroadcastMessage) String() string

type BroadcastReply added in v0.8.2

type BroadcastReply struct {
	Ref   *v1.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	Reply *totem.RPC    `protobuf:"bytes,2,opt,name=reply,proto3" json:"reply,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastReply) Descriptor deprecated added in v0.8.2

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

Deprecated: Use BroadcastReply.ProtoReflect.Descriptor instead.

func (*BroadcastReply) GetRef added in v0.8.2

func (x *BroadcastReply) GetRef() *v1.Reference

func (*BroadcastReply) GetReply added in v0.8.2

func (x *BroadcastReply) GetReply() *totem.RPC

func (*BroadcastReply) ProtoMessage added in v0.8.2

func (*BroadcastReply) ProtoMessage()

func (*BroadcastReply) ProtoReflect added in v0.8.2

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

func (*BroadcastReply) Reset added in v0.8.2

func (x *BroadcastReply) Reset()

func (*BroadcastReply) String added in v0.8.2

func (x *BroadcastReply) String() string

type BroadcastReplyList added in v0.8.2

type BroadcastReplyList struct {
	Responses []*BroadcastReply `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

func (*BroadcastReplyList) Descriptor deprecated added in v0.8.2

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

Deprecated: Use BroadcastReplyList.ProtoReflect.Descriptor instead.

func (*BroadcastReplyList) GetResponses added in v0.8.2

func (x *BroadcastReplyList) GetResponses() []*BroadcastReply

func (*BroadcastReplyList) ProtoMessage added in v0.8.2

func (*BroadcastReplyList) ProtoMessage()

func (*BroadcastReplyList) ProtoReflect added in v0.8.2

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

func (*BroadcastReplyList) Reset added in v0.8.2

func (x *BroadcastReplyList) Reset()

func (*BroadcastReplyList) String added in v0.8.2

func (x *BroadcastReplyList) String() string

type DelegateClient added in v0.8.2

type DelegateClient interface {
	// A synchronous request-response RPC sent to a single client.
	Request(ctx context.Context, in *DelegatedMessage, opts ...grpc.CallOption) (*totem.RPC, error)
	// A best-effort broadcast sent to all connected clients, with an
	// optional target filter.
	Broadcast(ctx context.Context, in *BroadcastMessage, opts ...grpc.CallOption) (*BroadcastReplyList, error)
}

DelegateClient is the client API for Delegate 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 NewDelegateClient added in v0.8.2

func NewDelegateClient(cc grpc.ClientConnInterface) DelegateClient

type DelegateServer added in v0.8.2

type DelegateServer interface {
	// A synchronous request-response RPC sent to a single client.
	Request(context.Context, *DelegatedMessage) (*totem.RPC, error)
	// A best-effort broadcast sent to all connected clients, with an
	// optional target filter.
	Broadcast(context.Context, *BroadcastMessage) (*BroadcastReplyList, error)
	// contains filtered or unexported methods
}

DelegateServer is the server API for Delegate service. All implementations must embed UnimplementedDelegateServer for forward compatibility

type DelegatedMessage added in v0.8.2

type DelegatedMessage struct {
	Request *totem.RPC    `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	Target  *v1.Reference `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
	// contains filtered or unexported fields
}

func (*DelegatedMessage) Descriptor deprecated added in v0.8.2

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

Deprecated: Use DelegatedMessage.ProtoReflect.Descriptor instead.

func (*DelegatedMessage) GetRequest added in v0.8.2

func (x *DelegatedMessage) GetRequest() *totem.RPC

func (*DelegatedMessage) GetTarget added in v0.8.2

func (x *DelegatedMessage) GetTarget() *v1.Reference

func (*DelegatedMessage) ProtoMessage added in v0.8.2

func (*DelegatedMessage) ProtoMessage()

func (*DelegatedMessage) ProtoReflect added in v0.8.2

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

func (*DelegatedMessage) Reset added in v0.8.2

func (x *DelegatedMessage) Reset()

func (*DelegatedMessage) String added in v0.8.2

func (x *DelegatedMessage) String() string

type DelegatedMessageReply added in v0.8.2

type DelegatedMessageReply struct {
	Reply  *totem.RPC     `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
	Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DelegatedMessageReply) Descriptor deprecated added in v0.8.2

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

Deprecated: Use DelegatedMessageReply.ProtoReflect.Descriptor instead.

func (*DelegatedMessageReply) GetReply added in v0.8.2

func (x *DelegatedMessageReply) GetReply() *totem.RPC

func (*DelegatedMessageReply) GetStatus added in v0.8.2

func (x *DelegatedMessageReply) GetStatus() *status.Status

func (*DelegatedMessageReply) ProtoMessage added in v0.8.2

func (*DelegatedMessageReply) ProtoMessage()

func (*DelegatedMessageReply) ProtoReflect added in v0.8.2

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

func (*DelegatedMessageReply) Reset added in v0.8.2

func (x *DelegatedMessageReply) Reset()

func (*DelegatedMessageReply) String added in v0.8.2

func (x *DelegatedMessageReply) String() string

type EventType added in v0.6.0

type EventType int32
const (
	EventType_Unknown           EventType = 0
	EventType_DiscoveryComplete EventType = 1
)

func (EventType) Descriptor added in v0.6.0

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum added in v0.6.0

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated added in v0.6.0

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

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number added in v0.6.0

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String added in v0.6.0

func (x EventType) String() string

func (EventType) Type added in v0.6.0

type StreamClient

type StreamClient interface {
	Connect(ctx context.Context, opts ...grpc.CallOption) (Stream_ConnectClient, error)
	// Used for implementation-specific events. No guarantees are made about
	// whether events will be sent or when.
	Notify(ctx context.Context, in *StreamEvent, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

StreamClient is the client API for Stream 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 NewStreamClient

func NewStreamClient(cc grpc.ClientConnInterface) StreamClient

type StreamEvent added in v0.6.0

type StreamEvent struct {
	Type          EventType `protobuf:"varint,1,opt,name=type,proto3,enum=stream.EventType" json:"type,omitempty"`
	CorrelationId string    `protobuf:"bytes,2,opt,name=correlationId,proto3" json:"correlationId,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamEvent) Descriptor deprecated added in v0.6.0

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

Deprecated: Use StreamEvent.ProtoReflect.Descriptor instead.

func (*StreamEvent) GetCorrelationId added in v0.11.0

func (x *StreamEvent) GetCorrelationId() string

func (*StreamEvent) GetType added in v0.6.0

func (x *StreamEvent) GetType() EventType

func (*StreamEvent) ProtoMessage added in v0.6.0

func (*StreamEvent) ProtoMessage()

func (*StreamEvent) ProtoReflect added in v0.6.0

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

func (*StreamEvent) Reset added in v0.6.0

func (x *StreamEvent) Reset()

func (*StreamEvent) String added in v0.6.0

func (x *StreamEvent) String() string

type StreamServer

type StreamServer interface {
	Connect(Stream_ConnectServer) error
	// Used for implementation-specific events. No guarantees are made about
	// whether events will be sent or when.
	Notify(context.Context, *StreamEvent) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

StreamServer is the server API for Stream service. All implementations must embed UnimplementedStreamServer for forward compatibility

type Stream_ConnectClient

type Stream_ConnectClient interface {
	Send(*totem.RPC) error
	Recv() (*totem.RPC, error)
	grpc.ClientStream
}

type Stream_ConnectServer

type Stream_ConnectServer interface {
	Send(*totem.RPC) error
	Recv() (*totem.RPC, error)
	grpc.ServerStream
}

type UnimplementedDelegateServer added in v0.8.2

type UnimplementedDelegateServer struct {
}

UnimplementedDelegateServer must be embedded to have forward compatible implementations.

func (UnimplementedDelegateServer) Broadcast added in v0.8.2

func (UnimplementedDelegateServer) Request added in v0.8.2

type UnimplementedStreamServer

type UnimplementedStreamServer struct {
}

UnimplementedStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamServer) Connect

func (UnimplementedStreamServer) Notify added in v0.6.0

type UnsafeDelegateServer added in v0.8.2

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

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

type UnsafeStreamServer

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

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

Jump to

Keyboard shortcuts

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