Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 ashish 1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one
3
 * or more contributor license agreements. See the NOTICE file
4
 * distributed with this work for additional information
5
 * regarding copyright ownership. The ASF licenses this file
6
 * to you under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in compliance
8
 * with the License. You may obtain a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied. See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19
 
20
/**
21
 * fb303.thrift
22
 */
23
 
24
namespace java com.facebook.fb303
25
namespace cpp facebook.fb303
26
namespace perl Facebook.FB303
27
 
28
/**
29
 * Common status reporting mechanism across all services
30
 */
31
enum fb_status {
32
  DEAD = 0,
33
  STARTING = 1,
34
  ALIVE = 2,
35
  STOPPING = 3,
36
  STOPPED = 4,
37
  WARNING = 5,
38
}
39
 
40
/**
41
 * Standard base service
42
 */
43
service FacebookService {
44
 
45
  /**
46
   * Returns a descriptive name of the service
47
   */
48
  string getName(),
49
 
50
  /**
51
   * Returns the version of the service
52
   */
53
  string getVersion(),
54
 
55
  /**
56
   * Gets the status of this service
57
   */
58
  fb_status getStatus(),
59
 
60
  /**
61
   * User friendly description of status, such as why the service is in
62
   * the dead or warning state, or what is being started or stopped.
63
   */
64
  string getStatusDetails(),
65
 
66
  /**
67
   * Gets the counters for this service
68
   */
69
  map<string, i64> getCounters(),
70
 
71
  /**
72
   * Gets the value of a single counter
73
   */
74
  i64 getCounter(1: string key),
75
 
76
  /**
77
   * Sets an option
78
   */
79
  void setOption(1: string key, 2: string value),
80
 
81
  /**
82
   * Gets an option
83
   */
84
  string getOption(1: string key),
85
 
86
  /**
87
   * Gets all options
88
   */
89
  map<string, string> getOptions(),
90
 
91
  /**
92
   * Returns a CPU profile over the given time interval (client and server
93
   * must agree on the profile format).
94
   */
95
  string getCpuProfile(1: i32 profileDurationInSec),
96
 
97
  /**
98
   * Returns the unix time that the server has been running since
99
   */
100
  i64 aliveSince(),
101
 
102
  /**
103
   * Tell the server to reload its configuration, reopen log files, etc
104
   */
105
  oneway void reinitialize(),
106
 
107
  /**
108
   * Suggest a shutdown to the server
109
   */
110
  oneway void shutdown(),
111
 
112
}