beacon

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LockOp_name = map[int32]string{
		0: "LOCK_OP_LOCK",
		1: "LOCK_OP_UNLOCK",
	}
	LockOp_value = map[string]int32{
		"LOCK_OP_LOCK":   0,
		"LOCK_OP_UNLOCK": 1,
	}
)

Enum value maps for LockOp.

View Source
var (
	AcquireOp_name = map[int32]string{
		0: "ACQUIRE_OP_LOCK",
		1: "ACQUIRE_OP_INIT_LOCK",
		2: "ACQUIRE_OP_SHARED_LOCK",
		3: "ACQUIRE_OP_INIT_SHARED_LOCK",
		4: "ACQUIRE_OP_UNLOCK",
		5: "ACQUIRE_OP_SET_INIT_DONE",
		6: "ACQUIRE_OP_SET_INIT_FAILED",
	}
	AcquireOp_value = map[string]int32{
		"ACQUIRE_OP_LOCK":             0,
		"ACQUIRE_OP_INIT_LOCK":        1,
		"ACQUIRE_OP_SHARED_LOCK":      2,
		"ACQUIRE_OP_INIT_SHARED_LOCK": 3,
		"ACQUIRE_OP_UNLOCK":           4,
		"ACQUIRE_OP_SET_INIT_DONE":    5,
		"ACQUIRE_OP_SET_INIT_FAILED":  6,
	}
)

Enum value maps for AcquireOp.

View Source
var (
	LockState_name = map[int32]string{
		0: "LOCK_STATE_LOCKED",
		1: "LOCK_STATE_SHARED_LOCKED",
		2: "LOCK_STATE_UNLOCKED",
	}
	LockState_value = map[string]int32{
		"LOCK_STATE_LOCKED":        0,
		"LOCK_STATE_SHARED_LOCKED": 1,
		"LOCK_STATE_UNLOCKED":      2,
	}
)

Enum value maps for LockState.

View Source
var BeaconService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "beacon.BeaconService",
	HandlerType: (*BeaconServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Interrupt",
			Handler:    _BeaconService_Interrupt_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "LockForNamespace",
			Handler:       _BeaconService_LockForNamespace_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "LockForBuild",
			Handler:       _BeaconService_LockForBuild_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "LockForContainerSetup",
			Handler:       _BeaconService_LockForContainerSetup_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "AcquireContainerLock",
			Handler:       _BeaconService_AcquireContainerLock_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "beacon.proto",
}

BeaconService_ServiceDesc is the grpc.ServiceDesc for BeaconService 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_beacon_proto protoreflect.FileDescriptor
View Source
var File_unique_proto protoreflect.FileDescriptor
View Source
var UniqueValueService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "beacon.UniqueValueService",
	HandlerType: (*UniqueValueServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StoreUniqueValue",
			Handler:    _UniqueValueService_StoreUniqueValue_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "unique.proto",
}

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

Functions

func RegisterBeaconServiceServer

func RegisterBeaconServiceServer(s grpc.ServiceRegistrar, srv BeaconServiceServer)

func RegisterUniqueValueServiceServer

func RegisterUniqueValueServiceServer(s grpc.ServiceRegistrar, srv UniqueValueServiceServer)

Types

type AcquireLockRequest

type AcquireLockRequest struct {
	Key       string    `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Operation AcquireOp `protobuf:"varint,2,opt,name=operation,proto3,enum=beacon.AcquireOp" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

func (*AcquireLockRequest) Descriptor deprecated

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

Deprecated: Use AcquireLockRequest.ProtoReflect.Descriptor instead.

func (*AcquireLockRequest) GetKey

func (x *AcquireLockRequest) GetKey() string

func (*AcquireLockRequest) GetOperation

func (x *AcquireLockRequest) GetOperation() AcquireOp

func (*AcquireLockRequest) ProtoMessage

func (*AcquireLockRequest) ProtoMessage()

func (*AcquireLockRequest) ProtoReflect

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

func (*AcquireLockRequest) Reset

func (x *AcquireLockRequest) Reset()

func (*AcquireLockRequest) String

func (x *AcquireLockRequest) String() string

type AcquireLockResponse added in v0.2.0

type AcquireLockResponse struct {
	State       LockState `protobuf:"varint,1,opt,name=state,proto3,enum=beacon.LockState" json:"state,omitempty"`
	AcquireInit bool      `protobuf:"varint,2,opt,name=acquireInit,proto3" json:"acquireInit,omitempty"`
	// contains filtered or unexported fields
}

func (*AcquireLockResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use AcquireLockResponse.ProtoReflect.Descriptor instead.

func (*AcquireLockResponse) GetAcquireInit added in v0.2.0

func (x *AcquireLockResponse) GetAcquireInit() bool

func (*AcquireLockResponse) GetState added in v0.2.0

func (x *AcquireLockResponse) GetState() LockState

func (*AcquireLockResponse) ProtoMessage added in v0.2.0

func (*AcquireLockResponse) ProtoMessage()

func (*AcquireLockResponse) ProtoReflect added in v0.2.0

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

func (*AcquireLockResponse) Reset added in v0.2.0

func (x *AcquireLockResponse) Reset()

func (*AcquireLockResponse) String added in v0.2.0

func (x *AcquireLockResponse) String() string

type AcquireOp

type AcquireOp int32
const (
	AcquireOp_ACQUIRE_OP_LOCK             AcquireOp = 0
	AcquireOp_ACQUIRE_OP_INIT_LOCK        AcquireOp = 1
	AcquireOp_ACQUIRE_OP_SHARED_LOCK      AcquireOp = 2
	AcquireOp_ACQUIRE_OP_INIT_SHARED_LOCK AcquireOp = 3
	AcquireOp_ACQUIRE_OP_UNLOCK           AcquireOp = 4
	AcquireOp_ACQUIRE_OP_SET_INIT_DONE    AcquireOp = 5
	AcquireOp_ACQUIRE_OP_SET_INIT_FAILED  AcquireOp = 6
)

func (AcquireOp) Descriptor

func (AcquireOp) Descriptor() protoreflect.EnumDescriptor

func (AcquireOp) Enum

func (x AcquireOp) Enum() *AcquireOp

func (AcquireOp) EnumDescriptor deprecated

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

Deprecated: Use AcquireOp.Descriptor instead.

func (AcquireOp) Number

func (x AcquireOp) Number() protoreflect.EnumNumber

func (AcquireOp) String

func (x AcquireOp) String() string

func (AcquireOp) Type

type BeaconServiceClient

type BeaconServiceClient interface {
	LockForNamespace(ctx context.Context, opts ...grpc.CallOption) (BeaconService_LockForNamespaceClient, error)
	LockForBuild(ctx context.Context, opts ...grpc.CallOption) (BeaconService_LockForBuildClient, error)
	LockForContainerSetup(ctx context.Context, opts ...grpc.CallOption) (BeaconService_LockForContainerSetupClient, error)
	AcquireContainerLock(ctx context.Context, opts ...grpc.CallOption) (BeaconService_AcquireContainerLockClient, error)
	Interrupt(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

BeaconServiceClient is the client API for BeaconService 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 BeaconServiceServer

type BeaconServiceServer interface {
	LockForNamespace(BeaconService_LockForNamespaceServer) error
	LockForBuild(BeaconService_LockForBuildServer) error
	LockForContainerSetup(BeaconService_LockForContainerSetupServer) error
	AcquireContainerLock(BeaconService_AcquireContainerLockServer) error
	Interrupt(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

BeaconServiceServer is the server API for BeaconService service. All implementations must embed UnimplementedBeaconServiceServer for forward compatibility

type BeaconService_AcquireContainerLockClient

type BeaconService_AcquireContainerLockClient interface {
	Send(*AcquireLockRequest) error
	Recv() (*AcquireLockResponse, error)
	grpc.ClientStream
}

type BeaconService_AcquireContainerLockServer

type BeaconService_AcquireContainerLockServer interface {
	Send(*AcquireLockResponse) error
	Recv() (*AcquireLockRequest, error)
	grpc.ServerStream
}

type BeaconService_LockForBuildClient added in v0.2.0

type BeaconService_LockForBuildClient interface {
	Send(*KeyedLockRequest) error
	Recv() (*LockResponse, error)
	grpc.ClientStream
}

type BeaconService_LockForBuildServer added in v0.2.0

type BeaconService_LockForBuildServer interface {
	Send(*LockResponse) error
	Recv() (*KeyedLockRequest, error)
	grpc.ServerStream
}

type BeaconService_LockForContainerSetupClient added in v0.2.0

type BeaconService_LockForContainerSetupClient interface {
	Send(*KeyedLockRequest) error
	Recv() (*LockResponse, error)
	grpc.ClientStream
}

type BeaconService_LockForContainerSetupServer added in v0.2.0

type BeaconService_LockForContainerSetupServer interface {
	Send(*LockResponse) error
	Recv() (*KeyedLockRequest, error)
	grpc.ServerStream
}

type BeaconService_LockForNamespaceClient added in v0.2.0

type BeaconService_LockForNamespaceClient interface {
	Send(*LockRequest) error
	Recv() (*LockResponse, error)
	grpc.ClientStream
}

type BeaconService_LockForNamespaceServer added in v0.2.0

type BeaconService_LockForNamespaceServer interface {
	Send(*LockResponse) error
	Recv() (*LockRequest, error)
	grpc.ServerStream
}

type KeyedLockRequest

type KeyedLockRequest struct {
	Key       string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Operation LockOp `protobuf:"varint,2,opt,name=operation,proto3,enum=beacon.LockOp" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyedLockRequest) Descriptor deprecated

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

Deprecated: Use KeyedLockRequest.ProtoReflect.Descriptor instead.

func (*KeyedLockRequest) GetKey

func (x *KeyedLockRequest) GetKey() string

func (*KeyedLockRequest) GetOperation

func (x *KeyedLockRequest) GetOperation() LockOp

func (*KeyedLockRequest) ProtoMessage

func (*KeyedLockRequest) ProtoMessage()

func (*KeyedLockRequest) ProtoReflect

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

func (*KeyedLockRequest) Reset

func (x *KeyedLockRequest) Reset()

func (*KeyedLockRequest) String

func (x *KeyedLockRequest) String() string

type LockOp

type LockOp int32
const (
	LockOp_LOCK_OP_LOCK   LockOp = 0
	LockOp_LOCK_OP_UNLOCK LockOp = 1
)

func (LockOp) Descriptor

func (LockOp) Descriptor() protoreflect.EnumDescriptor

func (LockOp) Enum

func (x LockOp) Enum() *LockOp

func (LockOp) EnumDescriptor deprecated

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

Deprecated: Use LockOp.Descriptor instead.

func (LockOp) Number

func (x LockOp) Number() protoreflect.EnumNumber

func (LockOp) String

func (x LockOp) String() string

func (LockOp) Type

func (LockOp) Type() protoreflect.EnumType

type LockRequest

type LockRequest struct {
	Operation LockOp `protobuf:"varint,1,opt,name=operation,proto3,enum=beacon.LockOp" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

func (*LockRequest) Descriptor deprecated

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

Deprecated: Use LockRequest.ProtoReflect.Descriptor instead.

func (*LockRequest) GetOperation

func (x *LockRequest) GetOperation() LockOp

func (*LockRequest) ProtoMessage

func (*LockRequest) ProtoMessage()

func (*LockRequest) ProtoReflect

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

func (*LockRequest) Reset

func (x *LockRequest) Reset()

func (*LockRequest) String

func (x *LockRequest) String() string

type LockResponse

type LockResponse struct {
	State LockState `protobuf:"varint,1,opt,name=state,proto3,enum=beacon.LockState" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*LockResponse) Descriptor deprecated

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

Deprecated: Use LockResponse.ProtoReflect.Descriptor instead.

func (*LockResponse) GetState

func (x *LockResponse) GetState() LockState

func (*LockResponse) ProtoMessage

func (*LockResponse) ProtoMessage()

func (*LockResponse) ProtoReflect

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

func (*LockResponse) Reset

func (x *LockResponse) Reset()

func (*LockResponse) String

func (x *LockResponse) String() string

type LockState

type LockState int32
const (
	LockState_LOCK_STATE_LOCKED        LockState = 0
	LockState_LOCK_STATE_SHARED_LOCKED LockState = 1
	LockState_LOCK_STATE_UNLOCKED      LockState = 2
)

func (LockState) Descriptor

func (LockState) Descriptor() protoreflect.EnumDescriptor

func (LockState) Enum

func (x LockState) Enum() *LockState

func (LockState) EnumDescriptor deprecated

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

Deprecated: Use LockState.Descriptor instead.

func (LockState) Number

func (x LockState) Number() protoreflect.EnumNumber

func (LockState) String

func (x LockState) String() string

func (LockState) Type

type StoreUniqueValueRequest

type StoreUniqueValueRequest struct {
	Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StoreUniqueValueRequest) Descriptor deprecated

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

Deprecated: Use StoreUniqueValueRequest.ProtoReflect.Descriptor instead.

func (*StoreUniqueValueRequest) GetStore

func (x *StoreUniqueValueRequest) GetStore() string

func (*StoreUniqueValueRequest) GetValue

func (x *StoreUniqueValueRequest) GetValue() string

func (*StoreUniqueValueRequest) ProtoMessage

func (*StoreUniqueValueRequest) ProtoMessage()

func (*StoreUniqueValueRequest) ProtoReflect

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

func (*StoreUniqueValueRequest) Reset

func (x *StoreUniqueValueRequest) Reset()

func (*StoreUniqueValueRequest) String

func (x *StoreUniqueValueRequest) String() string

type StoreUniqueValueResponse

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

func (*StoreUniqueValueResponse) Descriptor deprecated

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

Deprecated: Use StoreUniqueValueResponse.ProtoReflect.Descriptor instead.

func (*StoreUniqueValueResponse) GetSucceeded

func (x *StoreUniqueValueResponse) GetSucceeded() bool

func (*StoreUniqueValueResponse) ProtoMessage

func (*StoreUniqueValueResponse) ProtoMessage()

func (*StoreUniqueValueResponse) ProtoReflect

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

func (*StoreUniqueValueResponse) Reset

func (x *StoreUniqueValueResponse) Reset()

func (*StoreUniqueValueResponse) String

func (x *StoreUniqueValueResponse) String() string

type UnimplementedBeaconServiceServer

type UnimplementedBeaconServiceServer struct {
}

UnimplementedBeaconServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBeaconServiceServer) AcquireContainerLock

func (UnimplementedBeaconServiceServer) Interrupt

func (UnimplementedBeaconServiceServer) LockForBuild added in v0.2.0

func (UnimplementedBeaconServiceServer) LockForContainerSetup added in v0.2.0

func (UnimplementedBeaconServiceServer) LockForNamespace added in v0.2.0

type UnimplementedUniqueValueServiceServer

type UnimplementedUniqueValueServiceServer struct {
}

UnimplementedUniqueValueServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUniqueValueServiceServer) StoreUniqueValue

type UniqueValueServiceClient

type UniqueValueServiceClient interface {
	StoreUniqueValue(ctx context.Context, in *StoreUniqueValueRequest, opts ...grpc.CallOption) (*StoreUniqueValueResponse, error)
}

UniqueValueServiceClient is the client API for UniqueValueService 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 UniqueValueServiceServer

type UniqueValueServiceServer interface {
	StoreUniqueValue(context.Context, *StoreUniqueValueRequest) (*StoreUniqueValueResponse, error)
	// contains filtered or unexported methods
}

UniqueValueServiceServer is the server API for UniqueValueService service. All implementations must embed UnimplementedUniqueValueServiceServer for forward compatibility

type UnsafeBeaconServiceServer

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

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

type UnsafeUniqueValueServiceServer

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

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

Jump to

Keyboard shortcuts

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