gen

package
v0.0.0-...-4ff85e9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Transporter_SendChunks_FullMethodName         = "/Transporter/SendChunks"
	Transporter_GetDestination_FullMethodName     = "/Transporter/GetDestination"
	Transporter_ReceiveInfo_FullMethodName        = "/Transporter/ReceiveInfo"
	Transporter_ReceiveChunks_FullMethodName      = "/Transporter/ReceiveChunks"
	Transporter_SyncNodes_FullMethodName          = "/Transporter/SyncNodes"
	Transporter_Rebase_FullMethodName             = "/Transporter/Rebase"
	Transporter_AnnounceNewNode_FullMethodName    = "/Transporter/AnnounceNewNode"
	Transporter_AnnounceRemoveNode_FullMethodName = "/Transporter/AnnounceRemoveNode"
)
View Source
const (
	HealthChecker_Healthcheck_FullMethodName = "/HealthChecker/Healthcheck"
)

Variables

View Source
var File_stash_proto protoreflect.FileDescriptor
View Source
var HealthChecker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "HealthChecker",
	HandlerType: (*HealthCheckerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Healthcheck",
			Handler:    _HealthChecker_Healthcheck_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "stash.proto",
}

HealthChecker_ServiceDesc is the grpc.ServiceDesc for HealthChecker 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 Transporter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Transporter",
	HandlerType: (*TransporterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDestination",
			Handler:    _Transporter_GetDestination_Handler,
		},
		{
			MethodName: "ReceiveInfo",
			Handler:    _Transporter_ReceiveInfo_Handler,
		},
		{
			MethodName: "Rebase",
			Handler:    _Transporter_Rebase_Handler,
		},
		{
			MethodName: "AnnounceNewNode",
			Handler:    _Transporter_AnnounceNewNode_Handler,
		},
		{
			MethodName: "AnnounceRemoveNode",
			Handler:    _Transporter_AnnounceRemoveNode_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SendChunks",
			Handler:       _Transporter_SendChunks_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "ReceiveChunks",
			Handler:       _Transporter_ReceiveChunks_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "SyncNodes",
			Handler:       _Transporter_SyncNodes_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "stash.proto",
}

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

Functions

func RegisterHealthCheckerServer

func RegisterHealthCheckerServer(s grpc.ServiceRegistrar, srv HealthCheckerServer)

func RegisterTransporterServer

func RegisterTransporterServer(s grpc.ServiceRegistrar, srv TransporterServer)

Types

type Chunk

type Chunk struct {

	// Types that are assignable to Data:
	//
	//	*Chunk_Meta
	//	*Chunk_ChunkData
	Data isChunk_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetChunkData

func (x *Chunk) GetChunkData() []byte

func (*Chunk) GetData

func (m *Chunk) GetData() isChunk_Data

func (*Chunk) GetMeta

func (x *Chunk) GetMeta() *Chunk_FileMetadata

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type Chunk_ChunkData

type Chunk_ChunkData struct {
	ChunkData []byte `protobuf:"bytes,2,opt,name=chunk_data,json=chunkData,proto3,oneof"`
}

type Chunk_FileMetadata

type Chunk_FileMetadata struct {
	Key         string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	ContentHash *string `protobuf:"bytes,2,opt,name=content_hash,json=contentHash,proto3,oneof" json:"content_hash,omitempty"`
	FilePath    *string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3,oneof" json:"file_path,omitempty"`
	Compressed  bool    `protobuf:"varint,4,opt,name=compressed,proto3" json:"compressed,omitempty"`
	Replicate   bool    `protobuf:"varint,5,opt,name=replicate,proto3" json:"replicate,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk_FileMetadata) Descriptor deprecated

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

Deprecated: Use Chunk_FileMetadata.ProtoReflect.Descriptor instead.

func (*Chunk_FileMetadata) GetCompressed

func (x *Chunk_FileMetadata) GetCompressed() bool

func (*Chunk_FileMetadata) GetContentHash

func (x *Chunk_FileMetadata) GetContentHash() string

func (*Chunk_FileMetadata) GetFilePath

func (x *Chunk_FileMetadata) GetFilePath() string

func (*Chunk_FileMetadata) GetKey

func (x *Chunk_FileMetadata) GetKey() string

func (*Chunk_FileMetadata) GetReplicate

func (x *Chunk_FileMetadata) GetReplicate() bool

func (*Chunk_FileMetadata) ProtoMessage

func (*Chunk_FileMetadata) ProtoMessage()

func (*Chunk_FileMetadata) ProtoReflect

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

func (*Chunk_FileMetadata) Reset

func (x *Chunk_FileMetadata) Reset()

func (*Chunk_FileMetadata) String

func (x *Chunk_FileMetadata) String() string

type Chunk_Meta

type Chunk_Meta struct {
	Meta *Chunk_FileMetadata `protobuf:"bytes,1,opt,name=meta,proto3,oneof"`
}

type HealthCheckerClient

type HealthCheckerClient interface {
	Healthcheck(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

HealthCheckerClient is the client API for HealthChecker 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 HealthCheckerServer

type HealthCheckerServer interface {
	Healthcheck(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

HealthCheckerServer is the server API for HealthChecker service. All implementations must embed UnimplementedHealthCheckerServer for forward compatibility.

type KeyRequest

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

func (*KeyRequest) Descriptor deprecated

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

Deprecated: Use KeyRequest.ProtoReflect.Descriptor instead.

func (*KeyRequest) GetKey

func (x *KeyRequest) GetKey() string

func (*KeyRequest) ProtoMessage

func (*KeyRequest) ProtoMessage()

func (*KeyRequest) ProtoReflect

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

func (*KeyRequest) Reset

func (x *KeyRequest) Reset()

func (*KeyRequest) String

func (x *KeyRequest) String() string

type NodeInfo

type NodeInfo struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Alive   bool   `protobuf:"varint,2,opt,name=alive,proto3" json:"alive,omitempty"` // ... ?
	// contains filtered or unexported fields
}

func (*NodeInfo) Descriptor deprecated

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

Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.

func (*NodeInfo) GetAddress

func (x *NodeInfo) GetAddress() string

func (*NodeInfo) GetAlive

func (x *NodeInfo) GetAlive() bool

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) ProtoReflect

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

func (*NodeInfo) Reset

func (x *NodeInfo) Reset()

func (*NodeInfo) String

func (x *NodeInfo) String() string

type ReceiveChunkRequest

type ReceiveChunkRequest struct {
	Hash              string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	NeedDecompression bool   `protobuf:"varint,2,opt,name=need_decompression,json=needDecompression,proto3" json:"need_decompression,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiveChunkRequest) Descriptor deprecated

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

Deprecated: Use ReceiveChunkRequest.ProtoReflect.Descriptor instead.

func (*ReceiveChunkRequest) GetHash

func (x *ReceiveChunkRequest) GetHash() string

func (*ReceiveChunkRequest) GetNeedDecompression

func (x *ReceiveChunkRequest) GetNeedDecompression() bool

func (*ReceiveChunkRequest) ProtoMessage

func (*ReceiveChunkRequest) ProtoMessage()

func (*ReceiveChunkRequest) ProtoReflect

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

func (*ReceiveChunkRequest) Reset

func (x *ReceiveChunkRequest) Reset()

func (*ReceiveChunkRequest) String

func (x *ReceiveChunkRequest) String() string

type ReceiveChunkResponse

type ReceiveChunkResponse struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiveChunkResponse) Descriptor deprecated

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

Deprecated: Use ReceiveChunkResponse.ProtoReflect.Descriptor instead.

func (*ReceiveChunkResponse) GetData

func (x *ReceiveChunkResponse) GetData() []byte

func (*ReceiveChunkResponse) ProtoMessage

func (*ReceiveChunkResponse) ProtoMessage()

func (*ReceiveChunkResponse) ProtoReflect

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

func (*ReceiveChunkResponse) Reset

func (x *ReceiveChunkResponse) Reset()

func (*ReceiveChunkResponse) String

func (x *ReceiveChunkResponse) String() string

type ReceiveInfoRequest

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

func (*ReceiveInfoRequest) Descriptor deprecated

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

Deprecated: Use ReceiveInfoRequest.ProtoReflect.Descriptor instead.

func (*ReceiveInfoRequest) GetKey

func (x *ReceiveInfoRequest) GetKey() string

func (*ReceiveInfoRequest) ProtoMessage

func (*ReceiveInfoRequest) ProtoMessage()

func (*ReceiveInfoRequest) ProtoReflect

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

func (*ReceiveInfoRequest) Reset

func (x *ReceiveInfoRequest) Reset()

func (*ReceiveInfoRequest) String

func (x *ReceiveInfoRequest) String() string

type ReceiveInfoResponse

type ReceiveInfoResponse struct {
	Size   uint32   `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	Hashes []string `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiveInfoResponse) Descriptor deprecated

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

Deprecated: Use ReceiveInfoResponse.ProtoReflect.Descriptor instead.

func (*ReceiveInfoResponse) GetHashes

func (x *ReceiveInfoResponse) GetHashes() []string

func (*ReceiveInfoResponse) GetSize

func (x *ReceiveInfoResponse) GetSize() uint32

func (*ReceiveInfoResponse) ProtoMessage

func (*ReceiveInfoResponse) ProtoMessage()

func (*ReceiveInfoResponse) ProtoReflect

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

func (*ReceiveInfoResponse) Reset

func (x *ReceiveInfoResponse) Reset()

func (*ReceiveInfoResponse) String

func (x *ReceiveInfoResponse) String() string

type StreamStatus

type StreamStatus struct {
	Size uint32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamStatus) Descriptor deprecated

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

Deprecated: Use StreamStatus.ProtoReflect.Descriptor instead.

func (*StreamStatus) GetSize

func (x *StreamStatus) GetSize() uint32

func (*StreamStatus) ProtoMessage

func (*StreamStatus) ProtoMessage()

func (*StreamStatus) ProtoReflect

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

func (*StreamStatus) Reset

func (x *StreamStatus) Reset()

func (*StreamStatus) String

func (x *StreamStatus) String() string

type TransporterClient

type TransporterClient interface {
	SendChunks(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[Chunk, StreamStatus], error)
	GetDestination(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*NodeInfo, error)
	ReceiveInfo(ctx context.Context, in *ReceiveInfoRequest, opts ...grpc.CallOption) (*ReceiveInfoResponse, error)
	ReceiveChunks(ctx context.Context, in *ReceiveChunkRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReceiveChunkResponse], error)
	SyncNodes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NodeInfo], error)
	Rebase(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AnnounceNewNode(ctx context.Context, in *NodeInfo, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AnnounceRemoveNode(ctx context.Context, in *NodeInfo, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

TransporterClient is the client API for Transporter 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 TransporterServer

type TransporterServer interface {
	SendChunks(grpc.ClientStreamingServer[Chunk, StreamStatus]) error
	GetDestination(context.Context, *KeyRequest) (*NodeInfo, error)
	ReceiveInfo(context.Context, *ReceiveInfoRequest) (*ReceiveInfoResponse, error)
	ReceiveChunks(*ReceiveChunkRequest, grpc.ServerStreamingServer[ReceiveChunkResponse]) error
	SyncNodes(*emptypb.Empty, grpc.ServerStreamingServer[NodeInfo]) error
	Rebase(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	AnnounceNewNode(context.Context, *NodeInfo) (*emptypb.Empty, error)
	AnnounceRemoveNode(context.Context, *NodeInfo) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

TransporterServer is the server API for Transporter service. All implementations must embed UnimplementedTransporterServer for forward compatibility.

type Transporter_ReceiveChunksClient

type Transporter_ReceiveChunksClient = grpc.ServerStreamingClient[ReceiveChunkResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transporter_ReceiveChunksServer

type Transporter_ReceiveChunksServer = grpc.ServerStreamingServer[ReceiveChunkResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transporter_SendChunksClient

type Transporter_SendChunksClient = grpc.ClientStreamingClient[Chunk, StreamStatus]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transporter_SendChunksServer

type Transporter_SendChunksServer = grpc.ClientStreamingServer[Chunk, StreamStatus]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transporter_SyncNodesClient

type Transporter_SyncNodesClient = grpc.ServerStreamingClient[NodeInfo]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Transporter_SyncNodesServer

type Transporter_SyncNodesServer = grpc.ServerStreamingServer[NodeInfo]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedHealthCheckerServer

type UnimplementedHealthCheckerServer struct{}

UnimplementedHealthCheckerServer 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 (UnimplementedHealthCheckerServer) Healthcheck

type UnimplementedTransporterServer

type UnimplementedTransporterServer struct{}

UnimplementedTransporterServer 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 (UnimplementedTransporterServer) AnnounceNewNode

func (UnimplementedTransporterServer) AnnounceRemoveNode

func (UnimplementedTransporterServer) GetDestination

func (UnimplementedTransporterServer) Rebase

func (UnimplementedTransporterServer) ReceiveInfo

func (UnimplementedTransporterServer) SendChunks

func (UnimplementedTransporterServer) SyncNodes

type UnsafeHealthCheckerServer

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

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

type UnsafeTransporterServer

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

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

Jump to

Keyboard shortcuts

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