network

package
v0.0.0-...-37eefcc Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobStore_GetJob_FullMethodName             = "/network.JobStore/GetJob"
	JobStore_SetJob_FullMethodName             = "/network.JobStore/SetJob"
	JobStore_DeleteJob_FullMethodName          = "/network.JobStore/DeleteJob"
	JobStore_ReplicateSetJob_FullMethodName    = "/network.JobStore/ReplicateSetJob"
	JobStore_ReplicateDeleteJob_FullMethodName = "/network.JobStore/ReplicateDeleteJob"
)

Variables

View Source
var File_components_network_network_proto protoreflect.FileDescriptor
View Source
var JobStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "network.JobStore",
	HandlerType: (*JobStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetJob",
			Handler:    _JobStore_GetJob_Handler,
		},
		{
			MethodName: "SetJob",
			Handler:    _JobStore_SetJob_Handler,
		},
		{
			MethodName: "DeleteJob",
			Handler:    _JobStore_DeleteJob_Handler,
		},
		{
			MethodName: "ReplicateSetJob",
			Handler:    _JobStore_ReplicateSetJob_Handler,
		},
		{
			MethodName: "ReplicateDeleteJob",
			Handler:    _JobStore_ReplicateDeleteJob_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "components/network/network.proto",
}

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

Functions

func CreateJobStoreClient

func CreateJobStoreClient(conn *grpc.ClientConn, rpcTimeout time.Duration) *networkHandler

func RegisterJobStoreServer

func RegisterJobStoreServer(s grpc.ServiceRegistrar, srv JobStoreServer)

Types

type JobStoreClient

type JobStoreClient interface {
	// GetJob fetches the job from a time machine instance
	GetJob(ctx context.Context, in *jobmodels.JobFetchDetails, opts ...grpc.CallOption) (*jobmodels.JobCreationDetails, error)
	// SetJob adds the job to a time machine instance
	SetJob(ctx context.Context, in *jobmodels.JobCreationDetails, opts ...grpc.CallOption) (*jobmodels.JobCreationDetails, error)
	// DeleteJob will remove the job from time machine instance
	DeleteJob(ctx context.Context, in *jobmodels.JobFetchDetails, opts ...grpc.CallOption) (*jobmodels.Empty, error)
	// ReplicateSetJob is the same as SetJob. It is called only by the leader to replicate the job on the follower
	ReplicateSetJob(ctx context.Context, in *jobmodels.JobCreationDetails, opts ...grpc.CallOption) (*jobmodels.JobCreationDetails, error)
	// ReplicateDeleteJob is the same as DeleteJobJob. It is called only by the leader to replicate the job on the follower
	ReplicateDeleteJob(ctx context.Context, in *jobmodels.JobFetchDetails, opts ...grpc.CallOption) (*jobmodels.Empty, error)
}

JobStoreClient is the client API for JobStore 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 NewJobStoreClient

func NewJobStoreClient(cc grpc.ClientConnInterface) JobStoreClient

type JobStoreServer

type JobStoreServer interface {
	// GetJob fetches the job from a time machine instance
	GetJob(context.Context, *jobmodels.JobFetchDetails) (*jobmodels.JobCreationDetails, error)
	// SetJob adds the job to a time machine instance
	SetJob(context.Context, *jobmodels.JobCreationDetails) (*jobmodels.JobCreationDetails, error)
	// DeleteJob will remove the job from time machine instance
	DeleteJob(context.Context, *jobmodels.JobFetchDetails) (*jobmodels.Empty, error)
	// ReplicateSetJob is the same as SetJob. It is called only by the leader to replicate the job on the follower
	ReplicateSetJob(context.Context, *jobmodels.JobCreationDetails) (*jobmodels.JobCreationDetails, error)
	// ReplicateDeleteJob is the same as DeleteJobJob. It is called only by the leader to replicate the job on the follower
	ReplicateDeleteJob(context.Context, *jobmodels.JobFetchDetails) (*jobmodels.Empty, error)
	// contains filtered or unexported methods
}

JobStoreServer is the server API for JobStore service. All implementations must embed UnimplementedJobStoreServer for forward compatibility

type UnimplementedJobStoreServer

type UnimplementedJobStoreServer struct {
}

UnimplementedJobStoreServer must be embedded to have forward compatible implementations.

func (UnimplementedJobStoreServer) DeleteJob

func (UnimplementedJobStoreServer) ReplicateDeleteJob

type UnsafeJobStoreServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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