Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Reorganize code (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicKramer authored Oct 10, 2017
1 parent d4cf182 commit 82fb478
Show file tree
Hide file tree
Showing 41 changed files with 595 additions and 563 deletions.
6 changes: 3 additions & 3 deletions src/agent/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import {AuthenticationConfig} from '../types/common-types';
import * as common from '../types/common';

export interface DebugAgentConfig extends AuthenticationConfig {
export interface DebugAgentConfig extends common.AuthenticationConfig {
workingDirectory?: string;

/**
Expand Down Expand Up @@ -162,7 +162,7 @@ export interface DebugAgentConfig extends AuthenticationConfig {
testMode_: boolean;
}

export interface StackdriverConfig extends AuthenticationConfig {
export interface StackdriverConfig extends common.AuthenticationConfig {
debug?: DebugAgentConfig;
}

Expand Down
14 changes: 7 additions & 7 deletions src/controller.ts → src/agent/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
* @module debug/controller
*/

import {Common} from './types/common-types';
import {Common} from '../types/common';
export const common: Common = require('@google-cloud/common');

import * as assert from 'assert';
import * as http from 'http';
import * as qs from 'querystring';

import {Debug} from './debug';
import {Debuggee} from './debuggee';
import {Breakpoint, ListBreakpointsQuery, ListBreakpointsResponse} from './types/api-types';
import {Debug} from '../client/stackdriver/debug';
import {Debuggee} from '../debuggee';
import * as stackdriver from '../types/stackdriver';

/** @const {string} Cloud Debug API endpoint */
const API = 'https://clouddebugger.googleapis.com/v2/controller';
Expand Down Expand Up @@ -87,10 +87,10 @@ export class Controller extends common.ServiceObject {
debuggee: Debuggee,
callback:
(err: Error|null, response?: http.ServerResponse,
body?: ListBreakpointsResponse) => void): void {
body?: stackdriver.ListBreakpointsResponse) => void): void {
const that = this;
assert(debuggee.id, 'should have a registered debuggee');
const query: ListBreakpointsQuery = {successOnTimeout: true};
const query: stackdriver.ListBreakpointsQuery = {successOnTimeout: true};
if (that.nextWaitToken_) {
query.waitToken = that.nextWaitToken_;
}
Expand Down Expand Up @@ -129,7 +129,7 @@ export class Controller extends common.ServiceObject {
* @param {!Function} callback accepting (err, body)
*/
updateBreakpoint(
debuggee: Debuggee, breakpoint: Breakpoint,
debuggee: Debuggee, breakpoint: stackdriver.Breakpoint,
callback: (err?: Error, body?: any) => void): void {
assert(debuggee.id, 'should have a registered debuggee');

Expand Down
107 changes: 0 additions & 107 deletions src/agent/debugapi.ts

This file was deleted.

Loading

0 comments on commit 82fb478

Please sign in to comment.