errdefs

package
v0.13.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 15 Imported by: 28

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCanceled

func IsCanceled(ctx context.Context, err error) bool

func NewUnknownJobError added in v0.13.0

func NewUnknownJobError(id string) error

func NewUnsupportedFrontendCapError

func NewUnsupportedFrontendCapError(name string) error

func NewUnsupportedSubrequestError

func NewUnsupportedSubrequestError(name string) error

func WithOp

func WithOp(err error, iface interface{}) error

func WithSolveError

func WithSolveError(err error, subject IsSolve_Subject, inputIDs, mountIDs []string) error

func WithSource

func WithSource(err error, src Source) error

func WrapVertex

func WrapVertex(err error, dgst digest.Digest) error

Types

type ContentCache

type ContentCache struct {
	// Original index of result that failed the slow cache calculation.
	Index                int64    `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ContentCache) Descriptor

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

func (*ContentCache) GetIndex

func (m *ContentCache) GetIndex() int64

func (*ContentCache) ProtoMessage

func (*ContentCache) ProtoMessage()

func (*ContentCache) Reset

func (m *ContentCache) Reset()

func (*ContentCache) String

func (m *ContentCache) String() string

func (*ContentCache) XXX_DiscardUnknown

func (m *ContentCache) XXX_DiscardUnknown()

func (*ContentCache) XXX_Marshal

func (m *ContentCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContentCache) XXX_Merge

func (m *ContentCache) XXX_Merge(src proto.Message)

func (*ContentCache) XXX_Size

func (m *ContentCache) XXX_Size() int

func (*ContentCache) XXX_Unmarshal

func (m *ContentCache) XXX_Unmarshal(b []byte) error

type ErrorSource

type ErrorSource struct {
	Source
	// contains filtered or unexported fields
}

func (*ErrorSource) ToProto

func (e *ErrorSource) ToProto() grpcerrors.TypedErrorProto

func (*ErrorSource) Unwrap

func (e *ErrorSource) Unwrap() error

type FileAction

type FileAction struct {
	// Index of the file action that failed the exec.
	Index                int64    `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FileAction) Descriptor

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

func (*FileAction) GetIndex

func (m *FileAction) GetIndex() int64

func (*FileAction) ProtoMessage

func (*FileAction) ProtoMessage()

func (*FileAction) Reset

func (m *FileAction) Reset()

func (*FileAction) String

func (m *FileAction) String() string

func (*FileAction) XXX_DiscardUnknown

func (m *FileAction) XXX_DiscardUnknown()

func (*FileAction) XXX_Marshal

func (m *FileAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileAction) XXX_Merge

func (m *FileAction) XXX_Merge(src proto.Message)

func (*FileAction) XXX_Size

func (m *FileAction) XXX_Size() int

func (*FileAction) XXX_Unmarshal

func (m *FileAction) XXX_Unmarshal(b []byte) error

type FrontendCap

type FrontendCap struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FrontendCap) Descriptor

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

func (*FrontendCap) GetName

func (m *FrontendCap) GetName() string

func (*FrontendCap) ProtoMessage

func (*FrontendCap) ProtoMessage()

func (*FrontendCap) Reset

func (m *FrontendCap) Reset()

func (*FrontendCap) String

func (m *FrontendCap) String() string

func (*FrontendCap) WrapError

func (v *FrontendCap) WrapError(err error) error

func (*FrontendCap) XXX_DiscardUnknown

func (m *FrontendCap) XXX_DiscardUnknown()

func (*FrontendCap) XXX_Marshal

func (m *FrontendCap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FrontendCap) XXX_Merge

func (m *FrontendCap) XXX_Merge(src proto.Message)

func (*FrontendCap) XXX_Size

func (m *FrontendCap) XXX_Size() int

func (*FrontendCap) XXX_Unmarshal

func (m *FrontendCap) XXX_Unmarshal(b []byte) error

type IsSolve_Subject

type IsSolve_Subject isSolve_Subject

type OpError

type OpError struct {
	Op *pb.Op
	// contains filtered or unexported fields
}

func (*OpError) Unwrap

func (e *OpError) Unwrap() error

type Solve

type Solve struct {
	InputIDs []string `protobuf:"bytes,1,rep,name=inputIDs,proto3" json:"inputIDs,omitempty"`
	MountIDs []string `protobuf:"bytes,2,rep,name=mountIDs,proto3" json:"mountIDs,omitempty"`
	Op       *pb.Op   `protobuf:"bytes,3,opt,name=op,proto3" json:"op,omitempty"`
	// Types that are valid to be assigned to Subject:
	//
	//	*Solve_File
	//	*Solve_Cache
	Subject              isSolve_Subject `protobuf_oneof:"subject"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Solve) Descriptor

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

func (*Solve) GetCache

func (m *Solve) GetCache() *ContentCache

func (*Solve) GetFile

func (m *Solve) GetFile() *FileAction

func (*Solve) GetInputIDs

func (m *Solve) GetInputIDs() []string

func (*Solve) GetMountIDs

func (m *Solve) GetMountIDs() []string

func (*Solve) GetOp

func (m *Solve) GetOp() *pb.Op

func (*Solve) GetSubject

func (m *Solve) GetSubject() isSolve_Subject

func (*Solve) MarshalJSON

func (v *Solve) MarshalJSON() ([]byte, error)

func (*Solve) ProtoMessage

func (*Solve) ProtoMessage()

func (*Solve) Reset

func (m *Solve) Reset()

func (*Solve) String

func (m *Solve) String() string

func (*Solve) UnmarshalJSON

func (v *Solve) UnmarshalJSON(b []byte) error

func (*Solve) WrapError

func (v *Solve) WrapError(err error) error

func (*Solve) XXX_DiscardUnknown

func (m *Solve) XXX_DiscardUnknown()

func (*Solve) XXX_Marshal

func (m *Solve) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Solve) XXX_Merge

func (m *Solve) XXX_Merge(src proto.Message)

func (*Solve) XXX_OneofWrappers

func (*Solve) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Solve) XXX_Size

func (m *Solve) XXX_Size() int

func (*Solve) XXX_Unmarshal

func (m *Solve) XXX_Unmarshal(b []byte) error

type SolveError

type SolveError struct {
	Solve
	Err error
}

SolveError will be returned when an error is encountered during a solve that has an exec op.

func (*SolveError) Error

func (e *SolveError) Error() string

func (*SolveError) ToProto

func (e *SolveError) ToProto() grpcerrors.TypedErrorProto

func (*SolveError) Unwrap

func (e *SolveError) Unwrap() error

type Solve_Cache

type Solve_Cache struct {
	Cache *ContentCache `protobuf:"bytes,5,opt,name=cache,proto3,oneof" json:"cache,omitempty"`
}

type Solve_File

type Solve_File struct {
	File *FileAction `protobuf:"bytes,4,opt,name=file,proto3,oneof" json:"file,omitempty"`
}

type Source

type Source struct {
	Info                 *pb.SourceInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Ranges               []*pb.Range    `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func Sources

func Sources(err error) []*Source

func (*Source) Descriptor

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

func (*Source) GetInfo

func (m *Source) GetInfo() *pb.SourceInfo

func (*Source) GetRanges

func (m *Source) GetRanges() []*pb.Range

func (*Source) Print

func (s *Source) Print(w io.Writer) error

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) Reset

func (m *Source) Reset()

func (*Source) String

func (m *Source) String() string

func (*Source) WrapError

func (s *Source) WrapError(err error) error

func (*Source) XXX_DiscardUnknown

func (m *Source) XXX_DiscardUnknown()

func (*Source) XXX_Marshal

func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Source) XXX_Merge

func (m *Source) XXX_Merge(src proto.Message)

func (*Source) XXX_Size

func (m *Source) XXX_Size() int

func (*Source) XXX_Unmarshal

func (m *Source) XXX_Unmarshal(b []byte) error

type Subrequest

type Subrequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Subrequest) Descriptor

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

func (*Subrequest) GetName

func (m *Subrequest) GetName() string

func (*Subrequest) ProtoMessage

func (*Subrequest) ProtoMessage()

func (*Subrequest) Reset

func (m *Subrequest) Reset()

func (*Subrequest) String

func (m *Subrequest) String() string

func (*Subrequest) WrapError

func (v *Subrequest) WrapError(err error) error

func (*Subrequest) XXX_DiscardUnknown

func (m *Subrequest) XXX_DiscardUnknown()

func (*Subrequest) XXX_Marshal

func (m *Subrequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subrequest) XXX_Merge

func (m *Subrequest) XXX_Merge(src proto.Message)

func (*Subrequest) XXX_Size

func (m *Subrequest) XXX_Size() int

func (*Subrequest) XXX_Unmarshal

func (m *Subrequest) XXX_Unmarshal(b []byte) error

type UnknownJobError added in v0.13.0

type UnknownJobError struct {
	// contains filtered or unexported fields
}

func (*UnknownJobError) Code added in v0.13.0

func (e *UnknownJobError) Code() codes.Code

func (*UnknownJobError) Error added in v0.13.0

func (e *UnknownJobError) Error() string

type UnsupportedFrontendCapError

type UnsupportedFrontendCapError struct {
	FrontendCap
	// contains filtered or unexported fields
}

func (*UnsupportedFrontendCapError) Error

func (*UnsupportedFrontendCapError) ToProto

func (*UnsupportedFrontendCapError) Unwrap

func (e *UnsupportedFrontendCapError) Unwrap() error

type UnsupportedSubrequestError

type UnsupportedSubrequestError struct {
	Subrequest
	// contains filtered or unexported fields
}

func (*UnsupportedSubrequestError) Error

func (*UnsupportedSubrequestError) ToProto

func (*UnsupportedSubrequestError) Unwrap

func (e *UnsupportedSubrequestError) Unwrap() error

type Vertex

type Vertex struct {
	Digest               string   `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Vertex) Descriptor

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

func (*Vertex) GetDigest

func (m *Vertex) GetDigest() string

func (*Vertex) ProtoMessage

func (*Vertex) ProtoMessage()

func (*Vertex) Reset

func (m *Vertex) Reset()

func (*Vertex) String

func (m *Vertex) String() string

func (*Vertex) WrapError

func (v *Vertex) WrapError(err error) error

func (*Vertex) XXX_DiscardUnknown

func (m *Vertex) XXX_DiscardUnknown()

func (*Vertex) XXX_Marshal

func (m *Vertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vertex) XXX_Merge

func (m *Vertex) XXX_Merge(src proto.Message)

func (*Vertex) XXX_Size

func (m *Vertex) XXX_Size() int

func (*Vertex) XXX_Unmarshal

func (m *Vertex) XXX_Unmarshal(b []byte) error

type VertexError

type VertexError struct {
	Vertex
	// contains filtered or unexported fields
}

func (*VertexError) ToProto

func (e *VertexError) ToProto() grpcerrors.TypedErrorProto

func (*VertexError) Unwrap

func (e *VertexError) Unwrap() error

Jump to

Keyboard shortcuts

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