storage_service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	NodeService_DownloadArtifact_FullMethodName = "/node_service.v1.NodeService/DownloadArtifact"
)

Variables

View Source
var (
	ArtifactType_name = map[int32]string{
		0: "ARTIFACT_TYPE_UNSPECIFIED",
		1: "ARTIFACT_TYPE_BINARY",
		2: "ARTIFACT_TYPE_CONFIG",
	}
	ArtifactType_value = map[string]int32{
		"ARTIFACT_TYPE_UNSPECIFIED": 0,
		"ARTIFACT_TYPE_BINARY":      1,
		"ARTIFACT_TYPE_CONFIG":      2,
	}
)

Enum value maps for ArtifactType.

View Source
var (
	EnvironmentName_name = map[int32]string{
		0: "ENVIRONMENT_NAME_UNSPECIFIED",
		1: "PRODUCTION_MAINNET",
		2: "PRODUCTION_TESTNET",
	}
	EnvironmentName_value = map[string]int32{
		"ENVIRONMENT_NAME_UNSPECIFIED": 0,
		"PRODUCTION_MAINNET":           1,
		"PRODUCTION_TESTNET":           2,
	}
)

Enum value maps for EnvironmentName.

View Source
var File_node_service_v1_node_service_proto protoreflect.FileDescriptor
View Source
var NodeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "node_service.v1.NodeService",
	HandlerType: (*NodeServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "DownloadArtifact",
			Handler:       _NodeService_DownloadArtifact_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "node_service/v1/node_service.proto",
}

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

Functions

func RegisterNodeServiceServer

func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)

Types

type ArtifactType

type ArtifactType int32
const (
	ArtifactType_ARTIFACT_TYPE_UNSPECIFIED ArtifactType = 0 // Unspecified artifact type
	ArtifactType_ARTIFACT_TYPE_BINARY      ArtifactType = 1 // Workflow binary artifact
	ArtifactType_ARTIFACT_TYPE_CONFIG      ArtifactType = 2 // Workflow configuration artifact
)

func (ArtifactType) Descriptor

func (ArtifactType) Enum

func (x ArtifactType) Enum() *ArtifactType

func (ArtifactType) EnumDescriptor deprecated

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

Deprecated: Use ArtifactType.Descriptor instead.

func (ArtifactType) Number

func (ArtifactType) String

func (x ArtifactType) String() string

func (ArtifactType) Type

type DownloadArtifactChunk

type DownloadArtifactChunk struct {
	Artifact     *WorkflowArtifact `protobuf:"bytes,1,opt,name=artifact,proto3" json:"artifact,omitempty"`                             // Only sent in the first chunk
	ContentChunk []byte            `protobuf:"bytes,2,opt,name=content_chunk,json=contentChunk,proto3" json:"content_chunk,omitempty"` // The chunk of file content
	Offset       int64             `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`                                // Offset of this chunk in the file
	LastChunk    bool              `protobuf:"varint,4,opt,name=last_chunk,json=lastChunk,proto3" json:"last_chunk,omitempty"`         // True if this is the last chunk
	// contains filtered or unexported fields
}

func (*DownloadArtifactChunk) Descriptor deprecated

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

Deprecated: Use DownloadArtifactChunk.ProtoReflect.Descriptor instead.

func (*DownloadArtifactChunk) GetArtifact

func (x *DownloadArtifactChunk) GetArtifact() *WorkflowArtifact

func (*DownloadArtifactChunk) GetContentChunk

func (x *DownloadArtifactChunk) GetContentChunk() []byte

func (*DownloadArtifactChunk) GetLastChunk

func (x *DownloadArtifactChunk) GetLastChunk() bool

func (*DownloadArtifactChunk) GetOffset

func (x *DownloadArtifactChunk) GetOffset() int64

func (*DownloadArtifactChunk) ProtoMessage

func (*DownloadArtifactChunk) ProtoMessage()

func (*DownloadArtifactChunk) ProtoReflect

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

func (*DownloadArtifactChunk) Reset

func (x *DownloadArtifactChunk) Reset()

func (*DownloadArtifactChunk) String

func (x *DownloadArtifactChunk) String() string

type DownloadArtifactRequest

type DownloadArtifactRequest struct {
	Id          string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                                         // ID of the artifact to download
	Type        ArtifactType    `protobuf:"varint,2,opt,name=type,proto3,enum=node_service.v1.ArtifactType" json:"type,omitempty"`                  // Type of the artifact to download
	Environment EnvironmentName `protobuf:"varint,3,opt,name=environment,proto3,enum=node_service.v1.EnvironmentName" json:"environment,omitempty"` // Environment of the artifact to download
	ChunkSize   int32           `protobuf:"varint,4,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`                         // Optional: chunk size in bytes (default 1MB if not set)
	// contains filtered or unexported fields
}

func (*DownloadArtifactRequest) Descriptor deprecated

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

Deprecated: Use DownloadArtifactRequest.ProtoReflect.Descriptor instead.

func (*DownloadArtifactRequest) GetChunkSize

func (x *DownloadArtifactRequest) GetChunkSize() int32

func (*DownloadArtifactRequest) GetEnvironment

func (x *DownloadArtifactRequest) GetEnvironment() EnvironmentName

func (*DownloadArtifactRequest) GetId

func (x *DownloadArtifactRequest) GetId() string

func (*DownloadArtifactRequest) GetType

func (*DownloadArtifactRequest) ProtoMessage

func (*DownloadArtifactRequest) ProtoMessage()

func (*DownloadArtifactRequest) ProtoReflect

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

func (*DownloadArtifactRequest) Reset

func (x *DownloadArtifactRequest) Reset()

func (*DownloadArtifactRequest) String

func (x *DownloadArtifactRequest) String() string

type EnvironmentName

type EnvironmentName int32

environment indicates which Workflow Registry to use

const (
	EnvironmentName_ENVIRONMENT_NAME_UNSPECIFIED EnvironmentName = 0 // Unspecified environment
	EnvironmentName_PRODUCTION_MAINNET           EnvironmentName = 1
	EnvironmentName_PRODUCTION_TESTNET           EnvironmentName = 2
)

func (EnvironmentName) Descriptor

func (EnvironmentName) Enum

func (x EnvironmentName) Enum() *EnvironmentName

func (EnvironmentName) EnumDescriptor deprecated

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

Deprecated: Use EnvironmentName.Descriptor instead.

func (EnvironmentName) Number

func (EnvironmentName) String

func (x EnvironmentName) String() string

func (EnvironmentName) Type

type NodeServiceClient

type NodeServiceClient interface {
	// DownloadArtifact streams a file from the storage service in chunks.
	DownloadArtifact(ctx context.Context, in *DownloadArtifactRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DownloadArtifactChunk], error)
}

NodeServiceClient is the client API for NodeService 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.

NodeService defines the download-related storage service interface that is used by nodes. Workflow nodes will directly connect via gRPC to the storage service to download artifacts.

type NodeServiceServer

type NodeServiceServer interface {
	// DownloadArtifact streams a file from the storage service in chunks.
	DownloadArtifact(*DownloadArtifactRequest, grpc.ServerStreamingServer[DownloadArtifactChunk]) error
	// contains filtered or unexported methods
}

NodeServiceServer is the server API for NodeService service. All implementations must embed UnimplementedNodeServiceServer for forward compatibility.

NodeService defines the download-related storage service interface that is used by nodes. Workflow nodes will directly connect via gRPC to the storage service to download artifacts.

type NodeService_DownloadArtifactClient

type NodeService_DownloadArtifactClient = grpc.ServerStreamingClient[DownloadArtifactChunk]

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

type NodeService_DownloadArtifactServer

type NodeService_DownloadArtifactServer = grpc.ServerStreamingServer[DownloadArtifactChunk]

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

type UnimplementedNodeServiceServer

type UnimplementedNodeServiceServer struct{}

UnimplementedNodeServiceServer 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.

type UnsafeNodeServiceServer

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

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

type WorkflowArtifact

type WorkflowArtifact struct {
	Id          string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                                                         // Unique workflow ID for the artifact
	Type        ArtifactType    `protobuf:"varint,2,opt,name=type,proto3,enum=node_service.v1.ArtifactType" json:"type,omitempty"`                  // Type of the artifact
	Environment EnvironmentName `protobuf:"varint,3,opt,name=environment,proto3,enum=node_service.v1.EnvironmentName" json:"environment,omitempty"` // Environment where the artifact is stored
	// contains filtered or unexported fields
}

func (*WorkflowArtifact) Descriptor deprecated

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

Deprecated: Use WorkflowArtifact.ProtoReflect.Descriptor instead.

func (*WorkflowArtifact) GetEnvironment

func (x *WorkflowArtifact) GetEnvironment() EnvironmentName

func (*WorkflowArtifact) GetId

func (x *WorkflowArtifact) GetId() string

func (*WorkflowArtifact) GetType

func (x *WorkflowArtifact) GetType() ArtifactType

func (*WorkflowArtifact) ProtoMessage

func (*WorkflowArtifact) ProtoMessage()

func (*WorkflowArtifact) ProtoReflect

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

func (*WorkflowArtifact) Reset

func (x *WorkflowArtifact) Reset()

func (*WorkflowArtifact) String

func (x *WorkflowArtifact) String() string

Jump to

Keyboard shortcuts

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