Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyAction[M proto.Message](conn *grpc.ClientConn, ctx context.Context, m M, opts ...grpc.CallOption) (M, error)
- func RegisterActionsServiceServer(s grpc.ServiceRegistrar, srv ActionsServiceServer)
- type ActionsServiceClient
- type ActionsServiceServer
- type ApplyActionRequest
- func (x *ApplyActionRequest) ClearItem()
- func (x *ApplyActionRequest) GetItem() *anypb.Any
- func (x *ApplyActionRequest) HasItem() bool
- func (*ApplyActionRequest) ProtoMessage()
- func (x *ApplyActionRequest) ProtoReflect() protoreflect.Message
- func (x *ApplyActionRequest) Reset()
- func (x *ApplyActionRequest) SetItem(v *anypb.Any)
- func (x *ApplyActionRequest) String() string
- type ApplyActionRequest_builder
- type ApplyActionResponse
- func (x *ApplyActionResponse) ClearItem()
- func (x *ApplyActionResponse) GetItem() *anypb.Any
- func (x *ApplyActionResponse) HasItem() bool
- func (*ApplyActionResponse) ProtoMessage()
- func (x *ApplyActionResponse) ProtoReflect() protoreflect.Message
- func (x *ApplyActionResponse) Reset()
- func (x *ApplyActionResponse) SetItem(v *anypb.Any)
- func (x *ApplyActionResponse) String() string
- type ApplyActionResponse_builder
- type Hub
- type Server
- type UnimplementedActionsServiceServer
- type UnsafeActionsServiceServer
Constants ¶
const (
ActionsService_ApplyAction_FullMethodName = "/aks.flex.components.services.actions.ActionsService/ApplyAction"
)
Variables ¶
var ( Default = NewHub() // MustRegister registers a action server for a giving action message type. // It panics if the server instantiation fails. MustRegister = Default.MustRegister )
var ActionsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aks.flex.components.services.actions.ActionsService", HandlerType: (*ActionsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ApplyAction", Handler: _ActionsService_ApplyAction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "components/services/actions/actions.proto", }
ActionsService_ServiceDesc is the grpc.ServiceDesc for ActionsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_components_services_actions_actions_proto protoreflect.FileDescriptor
Functions ¶
func ApplyAction ¶
func ApplyAction[M proto.Message]( conn *grpc.ClientConn, ctx context.Context, m M, opts ...grpc.CallOption, ) (M, error)
ApplyAction invokes the ApplyAction method on a giving gRPC client
func RegisterActionsServiceServer ¶
func RegisterActionsServiceServer(s grpc.ServiceRegistrar, srv ActionsServiceServer)
Types ¶
type ActionsServiceClient ¶
type ActionsServiceClient interface {
ApplyAction(ctx context.Context, in *ApplyActionRequest, opts ...grpc.CallOption) (*ApplyActionResponse, error)
}
ActionsServiceClient is the client API for ActionsService 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 NewActionsServiceClient ¶
func NewActionsServiceClient(cc grpc.ClientConnInterface) ActionsServiceClient
type ActionsServiceServer ¶
type ActionsServiceServer interface {
ApplyAction(context.Context, *ApplyActionRequest) (*ApplyActionResponse, error)
// contains filtered or unexported methods
}
ActionsServiceServer is the server API for ActionsService service. All implementations must embed UnimplementedActionsServiceServer for forward compatibility.
type ApplyActionRequest ¶
type ApplyActionRequest struct {
// contains filtered or unexported fields
}
func (*ApplyActionRequest) ClearItem ¶
func (x *ApplyActionRequest) ClearItem()
func (*ApplyActionRequest) GetItem ¶
func (x *ApplyActionRequest) GetItem() *anypb.Any
func (*ApplyActionRequest) HasItem ¶
func (x *ApplyActionRequest) HasItem() bool
func (*ApplyActionRequest) ProtoMessage ¶
func (*ApplyActionRequest) ProtoMessage()
func (*ApplyActionRequest) ProtoReflect ¶
func (x *ApplyActionRequest) ProtoReflect() protoreflect.Message
func (*ApplyActionRequest) Reset ¶
func (x *ApplyActionRequest) Reset()
func (*ApplyActionRequest) SetItem ¶
func (x *ApplyActionRequest) SetItem(v *anypb.Any)
func (*ApplyActionRequest) String ¶
func (x *ApplyActionRequest) String() string
type ApplyActionRequest_builder ¶
type ApplyActionRequest_builder struct {
Item *anypb.Any
// contains filtered or unexported fields
}
func (ApplyActionRequest_builder) Build ¶
func (b0 ApplyActionRequest_builder) Build() *ApplyActionRequest
type ApplyActionResponse ¶
type ApplyActionResponse struct {
// contains filtered or unexported fields
}
func (*ApplyActionResponse) ClearItem ¶
func (x *ApplyActionResponse) ClearItem()
func (*ApplyActionResponse) GetItem ¶
func (x *ApplyActionResponse) GetItem() *anypb.Any
func (*ApplyActionResponse) HasItem ¶
func (x *ApplyActionResponse) HasItem() bool
func (*ApplyActionResponse) ProtoMessage ¶
func (*ApplyActionResponse) ProtoMessage()
func (*ApplyActionResponse) ProtoReflect ¶
func (x *ApplyActionResponse) ProtoReflect() protoreflect.Message
func (*ApplyActionResponse) Reset ¶
func (x *ApplyActionResponse) Reset()
func (*ApplyActionResponse) SetItem ¶
func (x *ApplyActionResponse) SetItem(v *anypb.Any)
func (*ApplyActionResponse) String ¶
func (x *ApplyActionResponse) String() string
type ApplyActionResponse_builder ¶
type ApplyActionResponse_builder struct {
Item *anypb.Any
// contains filtered or unexported fields
}
func (ApplyActionResponse_builder) Build ¶
func (b0 ApplyActionResponse_builder) Build() *ApplyActionResponse
type Hub ¶
type Hub struct {
Servers map[string]Server
UnimplementedActionsServiceServer
}
Hub is the central registry for all actions. It forwards the ApplyAction request to the corresponding server based on the action type.
func (*Hub) ApplyAction ¶
func (h *Hub) ApplyAction( ctx context.Context, req *ApplyActionRequest, ) (*ApplyActionResponse, error)
type Server ¶
type Server interface {
ApplyAction(context.Context, *ApplyActionRequest) (*ApplyActionResponse, error)
}
Server is ActionsServiceServer without UnimplementedActionsServiceServer
type UnimplementedActionsServiceServer ¶
type UnimplementedActionsServiceServer struct{}
UnimplementedActionsServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedActionsServiceServer) ApplyAction ¶
func (UnimplementedActionsServiceServer) ApplyAction(context.Context, *ApplyActionRequest) (*ApplyActionResponse, error)
type UnsafeActionsServiceServer ¶
type UnsafeActionsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeActionsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionsServiceServer will result in compilation errors.