mirror of
https://github.com/actions/toolkit.git
synced 2026-08-14 00:00:18 +02:00
Cleanup implementation and use tarballs instead of streaming zip
This commit is contained in:
+10
-3
@@ -1,8 +1,8 @@
|
||||
import { HttpClient, HttpClientResponse, HttpCodes } from '@actions/http-client'
|
||||
import { BearerCredentialHandler } from '@actions/http-client/lib/auth'
|
||||
import { info, debug } from '@actions/core'
|
||||
import { CacheServiceClientJSON } from '../generated/results/api/v1/cache.twirp'
|
||||
import { getRuntimeToken, getCacheServiceURL } from './config'
|
||||
import { BearerCredentialHandler } from '@actions/http-client/lib/auth'
|
||||
import { HttpClient, HttpClientResponse, HttpCodes } from '@actions/http-client'
|
||||
import { CacheServiceClientJSON } from '../generated/results/api/v1/cache.twirp'
|
||||
// import {getUserAgentString} from './user-agent'
|
||||
// import {NetworkError, UsageError} from './errors'
|
||||
|
||||
@@ -16,6 +16,13 @@ interface Rpc {
|
||||
): Promise<object | Uint8Array>
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||
*
|
||||
* It adds retry logic to the request method, which is not present in the generated client.
|
||||
*
|
||||
* This class is used to interact with cache service v2.
|
||||
*/
|
||||
class CacheServiceClient implements Rpc {
|
||||
private httpClient: HttpClient
|
||||
private baseUrl: string
|
||||
|
||||
Reference in New Issue
Block a user