public Info(IEndpointAuthorization auth, IOnefuzzContext context) { _context = context; _auth = auth; // TODO: this isn’t actually shared between calls at the moment, // this needs to be placed into a class that can be registered into the // DI container and shared amongst instances. // // However, we need to be careful about auth and caching between different // credentials. _response = new Lazy <Async.Task <InfoResponse> >(async() => { var config = _context.ServiceConfiguration; var resourceGroup = _context.Creds.GetBaseResourceGroup(); var subscription = _context.Creds.GetSubscription(); var region = await _context.Creds.GetBaseRegion(); var asm = Assembly.GetExecutingAssembly(); var gitVersion = ReadResource(asm, "ApiService.onefuzzlib.git.version"); var buildId = ReadResource(asm, "ApiService.onefuzzlib.build.id"); var versionString = asm.GetCustomAttribute <AssemblyInformationalVersionAttribute>()?.InformationalVersion; return(new InfoResponse( ResourceGroup: resourceGroup, Subscription: subscription, Region: region, Versions: new Dictionary <string, InfoVersion> { { "onefuzz", new(gitVersion, buildId, versionString ?? "") } }, InstanceId: await _context.Containers.GetInstanceId(), InsightsAppid: config.ApplicationInsightsAppId, InsightsInstrumentationKey: config.ApplicationInsightsInstrumentationKey)); }, LazyThreadSafetyMode.PublicationOnly);
public AgentRegistration(ILogTracer log, IEndpointAuthorization auth, IOnefuzzContext context) { _log = log; _auth = auth; _context = context; }
public Proxy(ILogTracer log, IEndpointAuthorization auth, IOnefuzzContext context) { _log = log; _auth = auth; _context = context; }
public Jobs(IEndpointAuthorization auth, IOnefuzzContext context) { _context = context; _auth = auth; }
public ContainersFunction(ILogTracer logger, IEndpointAuthorization auth, IOnefuzzContext context) { _logger = logger; _auth = auth; _context = context; }
public Download(IEndpointAuthorization auth, IOnefuzzContext context) { _auth = auth; _context = context; }
public AgentCanSchedule(ILogTracer log, IEndpointAuthorization auth, IOnefuzzContext context) { _log = log; _auth = auth; _context = context; }