Documentation
¶
Index ¶
- Variables
- func ReadNotifyUseMessage(r io.Reader) (entities.Hash, error)
- func WriteCheckStatusReq(w io.Writer, reqID RequestID) error
- func WriteCheckStatusResp(w io.Writer, reqID RequestID, result ResultType, errCode int32) error
- func WriteFetchCASBlobReq(w io.Writer, req *FetchCASBlobReq) error
- func WriteFetchObjectReq(w io.Writer, req *FetchObjectReq) error
- func WriteFetchObjectResp(w io.Writer, resp *FetchObjectResp, objType RequestObjectType) error
- func WriteFetchStatReq(w io.Writer, req *FetchStatReq) error
- func WriteFetchStatResp(w io.Writer, resp *FetchStatResp) error
- func WriteSimpleUdsResp(w io.Writer, respType MessageType, reqID RequestID, result ResultType) error
- func WriteUdsIdentityGetReq(w io.Writer, req *UdsIdentityGetReq) error
- func WriteUdsIdentityGetResp(w io.Writer, resp *UdsIdentityGetResp) error
- func WriteUdsIdentityPutReq(w io.Writer, req *UdsIdentityPutReq) error
- func WriteUdsInitDeeptreeReq(w io.Writer, req *UdsInitDeeptreeReq) error
- func WriteUdsInitDeeptreeResp(w io.Writer, reqID RequestID, result ResultType, hash entities.Hash) error
- func WriteUdsMapResultsReq(w io.Writer, req *UdsMapResultsReq) error
- func WriteUdsMapResultsResp(w io.Writer, reqID RequestID, result ResultType, hashes []entities.Hash) error
- func WriteUdsPutInMapReq(w io.Writer, req *UdsPutInMapReq) error
- type BinaryObjectType
- type CASCacheman
- type CacheManStats
- type CheckStatusReq
- type CheckStatusResp
- type CleanReq
- type ClientStat
- type ExecStat
- type ExecuteRequest
- type ExecutionStat
- type FallbackStats
- type FetchARIReq
- type FetchCASBlobReq
- type FetchObjectReq
- type FetchObjectResp
- type FetchStatReq
- type FetchStatResp
- type GetRefsReq
- type HTTP
- type IdentityGetReq
- type IdentityGetResp
- type IdentityPutReq
- type MessageType
- type NewMapMessage
- type NewObjectMessage
- type OverallPushStat
- type PrefetchRequest
- type ProjectRefHash
- type PushBuildMetricsReq
- type PushGroupStat
- type PushStat
- type PutRefsReq
- type QueueStat
- type RefHash
- type RequestID
- type RequestObjectType
- type ResultType
- type SearchRefsReq
- type UdsIdentityGetReq
- type UdsIdentityGetResp
- type UdsIdentityPutReq
- type UdsInitDeeptreeReq
- type UdsInitDeeptreeResp
- type UdsMapResultsReq
- type UdsPutInMapReq
- type WaitForRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrResultWait = errors.New("waiting for the request result") ErrResultFailed = errors.Join(syscall.ECONNREFUSED, errors.New("fetch failed")) )
Functions ¶
func WriteCheckStatusResp ¶
func WriteFetchCASBlobReq ¶
func WriteFetchCASBlobReq(w io.Writer, req *FetchCASBlobReq) error
func WriteFetchObjectReq ¶
func WriteFetchObjectReq(w io.Writer, req *FetchObjectReq) error
func WriteFetchObjectResp ¶
func WriteFetchObjectResp(w io.Writer, resp *FetchObjectResp, objType RequestObjectType) error
func WriteFetchStatReq ¶
func WriteFetchStatReq(w io.Writer, req *FetchStatReq) error
func WriteFetchStatResp ¶
func WriteFetchStatResp(w io.Writer, resp *FetchStatResp) error
func WriteSimpleUdsResp ¶
func WriteSimpleUdsResp(w io.Writer, respType MessageType, reqID RequestID, result ResultType) error
func WriteUdsIdentityGetReq ¶
func WriteUdsIdentityGetReq(w io.Writer, req *UdsIdentityGetReq) error
func WriteUdsIdentityGetResp ¶
func WriteUdsIdentityGetResp(w io.Writer, resp *UdsIdentityGetResp) error
func WriteUdsIdentityPutReq ¶
func WriteUdsIdentityPutReq(w io.Writer, req *UdsIdentityPutReq) error
func WriteUdsInitDeeptreeReq ¶
func WriteUdsInitDeeptreeReq(w io.Writer, req *UdsInitDeeptreeReq) error
func WriteUdsMapResultsReq ¶
func WriteUdsMapResultsReq(w io.Writer, req *UdsMapResultsReq) error
func WriteUdsMapResultsResp ¶
func WriteUdsPutInMapReq ¶
func WriteUdsPutInMapReq(w io.Writer, req *UdsPutInMapReq) error
Types ¶
type BinaryObjectType ¶
type BinaryObjectType byte
const ( BinaryBlob BinaryObjectType = 0x01 BinaryObject BinaryObjectType = 0x02 )
type CASCacheman ¶
type CASCacheman interface {
FetchGitObjectRequest(key entities.Hash) (cacheman.ResultType, error)
FetchObjectRequest(key entities.Hash, objType cacheman.RequestObjectType) (cacheman.ResultType, error)
FetchStatRequest(key entities.Hash) (entities.StatInfo, error)
SendNewObject(key entities.Hash, objType cacheman.RequestObjectType) error
SendNotifyUse(key entities.Hash) error
Close() error
}
type CacheManStats ¶
type CacheManStats struct {
Connected bool
TotalSize int64
LRUSize int64
LocalCount int64
IndexCount int64
GCStart time.Time
GCEnd time.Time
EvictStart time.Time
EvictEnd time.Time
EvictCount int64
OldestObject time.Time
ClientStat
FetchBlobs *QueueStat
FetchTrees *QueueStat
FetchObjects *QueueStat
FetchARIs *QueueStat
FetchCASBlobs *QueueStat
FetchMaps *QueueStat
OverallPushStat
PushBlobs PushGroupStat
PushObjects PushGroupStat
PushTrees PushGroupStat
PushRefs PushGroupStat
PushMaps PushGroupStat
Phony PushGroupStat
Execute ExecStat
Fallback FallbackStats
}
type CheckStatusReq ¶
type CheckStatusReq struct {
RequestID RequestID
}
func ReadCheckStatusReq ¶
func ReadCheckStatusReq(r io.Reader) (*CheckStatusReq, error)
type CheckStatusResp ¶
type CheckStatusResp struct {
RequestID RequestID
Result ResultType
ErrorCode int32
}
func ReadCheckStatusResp ¶
func ReadCheckStatusResp(r io.Reader) (*CheckStatusResp, error)
type ClientStat ¶
type ExecuteRequest ¶
type ExecutionStat ¶
type FallbackStats ¶
type FetchARIReq ¶
func ReadFetchARIReq ¶
func ReadFetchARIReq(r io.Reader) (*FetchARIReq, error)
type FetchCASBlobReq ¶
func ReadFetchCASBlobReq ¶
func ReadFetchCASBlobReq(r io.Reader) (*FetchCASBlobReq, error)
type FetchObjectReq ¶
func ReadFetchObjectReq ¶
func ReadFetchObjectReq(r io.Reader) (*FetchObjectReq, error)
type FetchObjectResp ¶
type FetchObjectResp struct {
RequestID RequestID
Result ResultType
}
func ReadFetchCASBlobResp ¶
func ReadFetchCASBlobResp(r io.Reader) (*FetchObjectResp, error)
type FetchStatReq ¶
type FetchStatResp ¶
type FetchStatResp struct {
RequestID RequestID
Result ResultType
Size int64
Mode uint32
ObjectType BinaryObjectType
}
type GetRefsReq ¶
type HTTP ¶
type HTTP interface {
GetRefs(server string, project string, refs []string) ([]entities.Hash, error)
PutRefs(server string, project string, refs []entities.RefHash, blocking bool) error
SearchRefs(server string, project string, refPrefix string, limit int) ([]entities.ProjectRefHash, error)
UseMany(hashes []entities.Hash) error
WaitIdle(timeout time.Duration) error
Clean(req CleanReq) error
SendNewMap(from, to entities.Hash, localOnly bool) error
FetchMapRequest(key entities.Hash) error
MapResults(from entities.Hash) ([]entities.Hash, error)
Execute(req entities.Hash, patches []entities.Hash, storeMapResult, PrefetchInputs bool) (resp entities.Hash, err error)
WaitFor(timeout time.Duration, priority float64, objects []entities.Hash) (err error)
Stats() (CacheManStats, error)
KeepAlive(key entities.Hash) error
IsObjectRemote(key entities.Hash) (bool, error)
StartGC() error
Prefetch(blobs, objects []entities.Hash, priority float64) error
PushBuildMetrics(req *PushBuildMetricsReq) error
}
type IdentityGetReq ¶
type IdentityGetResp ¶
type IdentityPutReq ¶
type MessageType ¶
type MessageType byte
const ( FetchBlobType MessageType = 0x01 FetchBlobRespType MessageType = 0x02 FetchTreeType MessageType = 0x03 FetchTreeRespType MessageType = 0x04 FetchObjectType MessageType = 0x05 FetchObjectRespType MessageType = 0x06 NewBlobType MessageType = 0x07 NewTreeType MessageType = 0x08 NewObjectType MessageType = 0x09 FetchGitObjectType MessageType = 0x0a GetStatType MessageType = 0x0b GetStatRespType MessageType = 0x0c VersionType MessageType = 0x0d NotifyUseType MessageType = 0x0e IdentityPutReqType MessageType = 0x0f IdentityPutRespType MessageType = 0x10 IdentityGetReqType MessageType = 0x11 IdentityGetRespType MessageType = 0x12 MapResultsReqType MessageType = 0x13 MapResultsRespType MessageType = 0x14 PutInMapReqType MessageType = 0x15 PutInMapRespType MessageType = 0x16 FetchARIType MessageType = 0x17 FetchARIRespType MessageType = 0x18 InitDeeptreeReqType MessageType = 0x19 InitDeeptreeRespType MessageType = 0x1a CheckStatusType MessageType = 0x1b CheckStatusRespType MessageType = 0x1c FetchCASBlobType MessageType = 0x1d FetchCASBlobRespType MessageType = 0x1e )
type NewMapMessage ¶
type NewObjectMessage ¶
func ReadNewObjectMessage ¶
func ReadNewObjectMessage(r io.Reader) (*NewObjectMessage, error)
type OverallPushStat ¶
type PrefetchRequest ¶
type ProjectRefHash ¶
type PushBuildMetricsReq ¶
type PushGroupStat ¶
type PutRefsReq ¶
type QueueStat ¶
type QueueStat struct {
Input atomic.Int64
Output atomic.Int64
Active atomic.Int64
Retries atomic.Int64
Errors atomic.Int64
}
func (*QueueStat) MarshalJSON ¶
func (*QueueStat) UnmarshalJSON ¶
type RequestObjectType ¶
type RequestObjectType byte
const ( TypeBlob RequestObjectType = 1 TypeTree RequestObjectType = 2 TypeObject RequestObjectType = 3 TypeARI RequestObjectType = 4 TypeCASBlob RequestObjectType = 5 )
func ParseRequestType ¶
func ParseRequestType(t string) RequestObjectType
func (RequestObjectType) String ¶
func (t RequestObjectType) String() string
type ResultType ¶
type ResultType byte
const ( ResultWait ResultType = 0xff ResultSuccess ResultType = 0x01 ResultNotFound ResultType = 0x02 ResultFailed ResultType = 0x03 ResultTimeout ResultType = 0x04 )
func (ResultType) String ¶
func (r ResultType) String() string
func (ResultType) ToError ¶
func (r ResultType) ToError() error
type SearchRefsReq ¶
type UdsIdentityGetReq ¶
func ReadUdsIdentityGetReq ¶
func ReadUdsIdentityGetReq(r io.Reader) (*UdsIdentityGetReq, error)
type UdsIdentityGetResp ¶
type UdsIdentityGetResp struct {
RequestID RequestID
Result ResultType
SHA256 [32]byte
Size int64
Type byte
}
type UdsIdentityPutReq ¶
type UdsIdentityPutReq struct {
RequestID RequestID
SHA1 entities.Hash
SHA256 [32]byte
Size int64
Type byte
}
func ReadUdsIdentityPutReq ¶
func ReadUdsIdentityPutReq(r io.Reader) (*UdsIdentityPutReq, error)
type UdsInitDeeptreeReq ¶
func ReadUdsInitDeeptreeReq ¶
func ReadUdsInitDeeptreeReq(r io.Reader) (*UdsInitDeeptreeReq, error)
type UdsInitDeeptreeResp ¶
type UdsInitDeeptreeResp struct {
RequestID RequestID
Result ResultType
SHA1 entities.Hash
}
type UdsMapResultsReq ¶
func ReadUdsMapResultsReq ¶
func ReadUdsMapResultsReq(r io.Reader) (*UdsMapResultsReq, error)
type UdsPutInMapReq ¶
type UdsPutInMapReq struct {
RequestID RequestID
From entities.Hash
To entities.Hash
LocalOnly byte
}
func ReadUdsPutInMapReq ¶
func ReadUdsPutInMapReq(r io.Reader) (*UdsPutInMapReq, error)
Click to show internal directories.
Click to hide internal directories.