action_api

package
v0.0.0-...-fbe4266 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package action_api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ActionService_Start_FullMethodName     = "/viamlabs.services.action.v1.ActionService/Start"
	ActionService_Stop_FullMethodName      = "/viamlabs.services.action.v1.ActionService/Stop"
	ActionService_IsRunning_FullMethodName = "/viamlabs.services.action.v1.ActionService/IsRunning"
	ActionService_Status_FullMethodName    = "/viamlabs.services.action.v1.ActionService/Status"
)

Variables

View Source
var ActionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viamlabs.services.action.v1.ActionService",
	HandlerType: (*ActionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Start",
			Handler:    _ActionService_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _ActionService_Stop_Handler,
		},
		{
			MethodName: "IsRunning",
			Handler:    _ActionService_IsRunning_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _ActionService_Status_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "action.proto",
}

ActionService_ServiceDesc is the grpc.ServiceDesc for ActionService 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_action_proto protoreflect.FileDescriptor

Functions

func RegisterActionServiceHandler

func RegisterActionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterActionServiceHandler registers the http handlers for service ActionService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterActionServiceHandlerClient

func RegisterActionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionServiceClient) error

RegisterActionServiceHandlerClient registers the http handlers for service ActionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ActionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ActionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ActionServiceClient" to call the correct interceptors.

func RegisterActionServiceHandlerFromEndpoint

func RegisterActionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterActionServiceHandlerFromEndpoint is same as RegisterActionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterActionServiceHandlerServer

func RegisterActionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionServiceServer) error

RegisterActionServiceHandlerServer registers the http handlers for service ActionService to "mux". UnaryRPC :call ActionServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterActionServiceHandlerFromEndpoint instead.

func RegisterActionServiceServer

func RegisterActionServiceServer(s grpc.ServiceRegistrar, srv ActionServiceServer)

Types

type ActionServiceClient

type ActionServiceClient interface {
	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	IsRunning(ctx context.Context, in *IsRunningRequest, opts ...grpc.CallOption) (*IsRunningResponse, error)
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
}

ActionServiceClient is the client API for ActionService 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.

type ActionServiceServer

type ActionServiceServer interface {
	Start(context.Context, *StartRequest) (*StartResponse, error)
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	IsRunning(context.Context, *IsRunningRequest) (*IsRunningResponse, error)
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// contains filtered or unexported methods
}

ActionServiceServer is the server API for ActionService service. All implementations must embed UnimplementedActionServiceServer for forward compatibility

type IsRunningRequest

type IsRunningRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*IsRunningRequest) Descriptor deprecated

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

Deprecated: Use IsRunningRequest.ProtoReflect.Descriptor instead.

func (*IsRunningRequest) GetName

func (x *IsRunningRequest) GetName() string

func (*IsRunningRequest) ProtoMessage

func (*IsRunningRequest) ProtoMessage()

func (*IsRunningRequest) ProtoReflect

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

func (*IsRunningRequest) Reset

func (x *IsRunningRequest) Reset()

func (*IsRunningRequest) String

func (x *IsRunningRequest) String() string

type IsRunningResponse

type IsRunningResponse struct {
	Running bool `protobuf:"varint,1,opt,name=running,proto3" json:"running,omitempty"`
	// contains filtered or unexported fields
}

func (*IsRunningResponse) Descriptor deprecated

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

Deprecated: Use IsRunningResponse.ProtoReflect.Descriptor instead.

func (*IsRunningResponse) GetRunning

func (x *IsRunningResponse) GetRunning() bool

func (*IsRunningResponse) ProtoMessage

func (*IsRunningResponse) ProtoMessage()

func (*IsRunningResponse) ProtoReflect

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

func (*IsRunningResponse) Reset

func (x *IsRunningResponse) Reset()

func (*IsRunningResponse) String

func (x *IsRunningResponse) String() string

type StartRequest

type StartRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*StartRequest) Descriptor deprecated

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

Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.

func (*StartRequest) GetName

func (x *StartRequest) GetName() string

func (*StartRequest) ProtoMessage

func (*StartRequest) ProtoMessage()

func (*StartRequest) ProtoReflect

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

func (*StartRequest) Reset

func (x *StartRequest) Reset()

func (*StartRequest) String

func (x *StartRequest) String() string

type StartResponse

type StartResponse struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*StartResponse) Descriptor deprecated

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

Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.

func (*StartResponse) GetText

func (x *StartResponse) GetText() string

func (*StartResponse) ProtoMessage

func (*StartResponse) ProtoMessage()

func (*StartResponse) ProtoReflect

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

func (*StartResponse) Reset

func (x *StartResponse) Reset()

func (*StartResponse) String

func (x *StartResponse) String() string

type StatusRequest

type StatusRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusRequest) Descriptor deprecated

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

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) GetName

func (x *StatusRequest) GetName() string

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

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

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type StatusResponse

type StatusResponse struct {
	Status map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*StatusResponse) Descriptor deprecated

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

Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.

func (*StatusResponse) GetStatus

func (x *StatusResponse) GetStatus() map[string]*structpb.Value

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) ProtoReflect

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

func (*StatusResponse) Reset

func (x *StatusResponse) Reset()

func (*StatusResponse) String

func (x *StatusResponse) String() string

type StopRequest

type StopRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetName

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

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

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

type StopResponse struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) GetText

func (x *StopResponse) GetText() string

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

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

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedActionServiceServer

type UnimplementedActionServiceServer struct {
}

UnimplementedActionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedActionServiceServer) IsRunning

func (UnimplementedActionServiceServer) Start

func (UnimplementedActionServiceServer) Status

func (UnimplementedActionServiceServer) Stop

type UnsafeActionServiceServer

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

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

Jump to

Keyboard shortcuts

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