You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

668 line
29 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/devtools/cloudprofiler/v2/profiler.proto
  3. package cloudprofiler // import "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import duration "github.com/golang/protobuf/ptypes/duration"
  8. import _ "github.com/golang/protobuf/ptypes/timestamp"
  9. import _ "google.golang.org/genproto/googleapis/api/annotations"
  10. import field_mask "google.golang.org/genproto/protobuf/field_mask"
  11. import (
  12. context "golang.org/x/net/context"
  13. grpc "google.golang.org/grpc"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  24. // ProfileType is type of profiling data.
  25. // NOTE: the enumeration member names are used (in lowercase) as unique string
  26. // identifiers of profile types, so they must not be renamed.
  27. type ProfileType int32
  28. const (
  29. // Unspecified profile type.
  30. ProfileType_PROFILE_TYPE_UNSPECIFIED ProfileType = 0
  31. // Thread CPU time sampling.
  32. ProfileType_CPU ProfileType = 1
  33. // Wallclock time sampling. More expensive as stops all threads.
  34. ProfileType_WALL ProfileType = 2
  35. // In-use heap profile. Represents a snapshot of the allocations that are
  36. // live at the time of the profiling.
  37. ProfileType_HEAP ProfileType = 3
  38. // Single-shot collection of all thread stacks.
  39. ProfileType_THREADS ProfileType = 4
  40. // Synchronization contention profile.
  41. ProfileType_CONTENTION ProfileType = 5
  42. // Peak heap profile.
  43. ProfileType_PEAK_HEAP ProfileType = 6
  44. // Heap allocation profile. It represents the aggregation of all allocations
  45. // made over the duration of the profile. All allocations are included,
  46. // including those that might have been freed by the end of the profiling
  47. // interval. The profile is in particular useful for garbage collecting
  48. // languages to understand which parts of the code create most of the garbage
  49. // collection pressure to see if those can be optimized.
  50. ProfileType_HEAP_ALLOC ProfileType = 7
  51. )
  52. var ProfileType_name = map[int32]string{
  53. 0: "PROFILE_TYPE_UNSPECIFIED",
  54. 1: "CPU",
  55. 2: "WALL",
  56. 3: "HEAP",
  57. 4: "THREADS",
  58. 5: "CONTENTION",
  59. 6: "PEAK_HEAP",
  60. 7: "HEAP_ALLOC",
  61. }
  62. var ProfileType_value = map[string]int32{
  63. "PROFILE_TYPE_UNSPECIFIED": 0,
  64. "CPU": 1,
  65. "WALL": 2,
  66. "HEAP": 3,
  67. "THREADS": 4,
  68. "CONTENTION": 5,
  69. "PEAK_HEAP": 6,
  70. "HEAP_ALLOC": 7,
  71. }
  72. func (x ProfileType) String() string {
  73. return proto.EnumName(ProfileType_name, int32(x))
  74. }
  75. func (ProfileType) EnumDescriptor() ([]byte, []int) {
  76. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{0}
  77. }
  78. // CreateProfileRequest describes a profile resource online creation request.
  79. // The deployment field must be populated. The profile_type specifies the list
  80. // of profile types supported by the agent. The creation call will hang until a
  81. // profile of one of these types needs to be collected.
  82. type CreateProfileRequest struct {
  83. // Parent project to create the profile in.
  84. Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
  85. // Deployment details.
  86. Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"`
  87. // One or more profile types that the agent is capable of providing.
  88. ProfileType []ProfileType `protobuf:"varint,2,rep,packed,name=profile_type,json=profileType,proto3,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
  89. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  90. XXX_unrecognized []byte `json:"-"`
  91. XXX_sizecache int32 `json:"-"`
  92. }
  93. func (m *CreateProfileRequest) Reset() { *m = CreateProfileRequest{} }
  94. func (m *CreateProfileRequest) String() string { return proto.CompactTextString(m) }
  95. func (*CreateProfileRequest) ProtoMessage() {}
  96. func (*CreateProfileRequest) Descriptor() ([]byte, []int) {
  97. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{0}
  98. }
  99. func (m *CreateProfileRequest) XXX_Unmarshal(b []byte) error {
  100. return xxx_messageInfo_CreateProfileRequest.Unmarshal(m, b)
  101. }
  102. func (m *CreateProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  103. return xxx_messageInfo_CreateProfileRequest.Marshal(b, m, deterministic)
  104. }
  105. func (dst *CreateProfileRequest) XXX_Merge(src proto.Message) {
  106. xxx_messageInfo_CreateProfileRequest.Merge(dst, src)
  107. }
  108. func (m *CreateProfileRequest) XXX_Size() int {
  109. return xxx_messageInfo_CreateProfileRequest.Size(m)
  110. }
  111. func (m *CreateProfileRequest) XXX_DiscardUnknown() {
  112. xxx_messageInfo_CreateProfileRequest.DiscardUnknown(m)
  113. }
  114. var xxx_messageInfo_CreateProfileRequest proto.InternalMessageInfo
  115. func (m *CreateProfileRequest) GetParent() string {
  116. if m != nil {
  117. return m.Parent
  118. }
  119. return ""
  120. }
  121. func (m *CreateProfileRequest) GetDeployment() *Deployment {
  122. if m != nil {
  123. return m.Deployment
  124. }
  125. return nil
  126. }
  127. func (m *CreateProfileRequest) GetProfileType() []ProfileType {
  128. if m != nil {
  129. return m.ProfileType
  130. }
  131. return nil
  132. }
  133. // CreateOfflineProfileRequest describes a profile resource offline creation
  134. // request. Profile field must be set.
  135. type CreateOfflineProfileRequest struct {
  136. // Parent project to create the profile in.
  137. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  138. // Contents of the profile to create.
  139. Profile *Profile `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
  140. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  141. XXX_unrecognized []byte `json:"-"`
  142. XXX_sizecache int32 `json:"-"`
  143. }
  144. func (m *CreateOfflineProfileRequest) Reset() { *m = CreateOfflineProfileRequest{} }
  145. func (m *CreateOfflineProfileRequest) String() string { return proto.CompactTextString(m) }
  146. func (*CreateOfflineProfileRequest) ProtoMessage() {}
  147. func (*CreateOfflineProfileRequest) Descriptor() ([]byte, []int) {
  148. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{1}
  149. }
  150. func (m *CreateOfflineProfileRequest) XXX_Unmarshal(b []byte) error {
  151. return xxx_messageInfo_CreateOfflineProfileRequest.Unmarshal(m, b)
  152. }
  153. func (m *CreateOfflineProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  154. return xxx_messageInfo_CreateOfflineProfileRequest.Marshal(b, m, deterministic)
  155. }
  156. func (dst *CreateOfflineProfileRequest) XXX_Merge(src proto.Message) {
  157. xxx_messageInfo_CreateOfflineProfileRequest.Merge(dst, src)
  158. }
  159. func (m *CreateOfflineProfileRequest) XXX_Size() int {
  160. return xxx_messageInfo_CreateOfflineProfileRequest.Size(m)
  161. }
  162. func (m *CreateOfflineProfileRequest) XXX_DiscardUnknown() {
  163. xxx_messageInfo_CreateOfflineProfileRequest.DiscardUnknown(m)
  164. }
  165. var xxx_messageInfo_CreateOfflineProfileRequest proto.InternalMessageInfo
  166. func (m *CreateOfflineProfileRequest) GetParent() string {
  167. if m != nil {
  168. return m.Parent
  169. }
  170. return ""
  171. }
  172. func (m *CreateOfflineProfileRequest) GetProfile() *Profile {
  173. if m != nil {
  174. return m.Profile
  175. }
  176. return nil
  177. }
  178. // UpdateProfileRequest contains the profile to update.
  179. type UpdateProfileRequest struct {
  180. // Profile to update
  181. Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
  182. // Field mask used to specify the fields to be overwritten. Currently only
  183. // profile_bytes and labels fields are supported by UpdateProfile, so only
  184. // those fields can be specified in the mask. When no mask is provided, all
  185. // fields are overwritten.
  186. UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
  187. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  188. XXX_unrecognized []byte `json:"-"`
  189. XXX_sizecache int32 `json:"-"`
  190. }
  191. func (m *UpdateProfileRequest) Reset() { *m = UpdateProfileRequest{} }
  192. func (m *UpdateProfileRequest) String() string { return proto.CompactTextString(m) }
  193. func (*UpdateProfileRequest) ProtoMessage() {}
  194. func (*UpdateProfileRequest) Descriptor() ([]byte, []int) {
  195. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{2}
  196. }
  197. func (m *UpdateProfileRequest) XXX_Unmarshal(b []byte) error {
  198. return xxx_messageInfo_UpdateProfileRequest.Unmarshal(m, b)
  199. }
  200. func (m *UpdateProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  201. return xxx_messageInfo_UpdateProfileRequest.Marshal(b, m, deterministic)
  202. }
  203. func (dst *UpdateProfileRequest) XXX_Merge(src proto.Message) {
  204. xxx_messageInfo_UpdateProfileRequest.Merge(dst, src)
  205. }
  206. func (m *UpdateProfileRequest) XXX_Size() int {
  207. return xxx_messageInfo_UpdateProfileRequest.Size(m)
  208. }
  209. func (m *UpdateProfileRequest) XXX_DiscardUnknown() {
  210. xxx_messageInfo_UpdateProfileRequest.DiscardUnknown(m)
  211. }
  212. var xxx_messageInfo_UpdateProfileRequest proto.InternalMessageInfo
  213. func (m *UpdateProfileRequest) GetProfile() *Profile {
  214. if m != nil {
  215. return m.Profile
  216. }
  217. return nil
  218. }
  219. func (m *UpdateProfileRequest) GetUpdateMask() *field_mask.FieldMask {
  220. if m != nil {
  221. return m.UpdateMask
  222. }
  223. return nil
  224. }
  225. // Profile resource.
  226. type Profile struct {
  227. // Output only. Opaque, server-assigned, unique ID for this profile.
  228. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  229. // Type of profile.
  230. // For offline mode, this must be specified when creating the profile. For
  231. // online mode it is assigned and returned by the server.
  232. ProfileType ProfileType `protobuf:"varint,2,opt,name=profile_type,json=profileType,proto3,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
  233. // Deployment this profile corresponds to.
  234. Deployment *Deployment `protobuf:"bytes,3,opt,name=deployment,proto3" json:"deployment,omitempty"`
  235. // Duration of the profiling session.
  236. // Input (for the offline mode) or output (for the online mode).
  237. // The field represents requested profiling duration. It may slightly differ
  238. // from the effective profiling duration, which is recorded in the profile
  239. // data, in case the profiling can't be stopped immediately (e.g. in case
  240. // stopping the profiling is handled asynchronously).
  241. Duration *duration.Duration `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"`
  242. // Input only. Profile bytes, as a gzip compressed serialized proto, the
  243. // format is https://github.com/google/pprof/blob/master/proto/profile.proto.
  244. ProfileBytes []byte `protobuf:"bytes,5,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"`
  245. // Input only. Labels associated to this specific profile. These labels will
  246. // get merged with the deployment labels for the final data set. See
  247. // documentation on deployment labels for validation rules and limits.
  248. Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  249. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  250. XXX_unrecognized []byte `json:"-"`
  251. XXX_sizecache int32 `json:"-"`
  252. }
  253. func (m *Profile) Reset() { *m = Profile{} }
  254. func (m *Profile) String() string { return proto.CompactTextString(m) }
  255. func (*Profile) ProtoMessage() {}
  256. func (*Profile) Descriptor() ([]byte, []int) {
  257. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{3}
  258. }
  259. func (m *Profile) XXX_Unmarshal(b []byte) error {
  260. return xxx_messageInfo_Profile.Unmarshal(m, b)
  261. }
  262. func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  263. return xxx_messageInfo_Profile.Marshal(b, m, deterministic)
  264. }
  265. func (dst *Profile) XXX_Merge(src proto.Message) {
  266. xxx_messageInfo_Profile.Merge(dst, src)
  267. }
  268. func (m *Profile) XXX_Size() int {
  269. return xxx_messageInfo_Profile.Size(m)
  270. }
  271. func (m *Profile) XXX_DiscardUnknown() {
  272. xxx_messageInfo_Profile.DiscardUnknown(m)
  273. }
  274. var xxx_messageInfo_Profile proto.InternalMessageInfo
  275. func (m *Profile) GetName() string {
  276. if m != nil {
  277. return m.Name
  278. }
  279. return ""
  280. }
  281. func (m *Profile) GetProfileType() ProfileType {
  282. if m != nil {
  283. return m.ProfileType
  284. }
  285. return ProfileType_PROFILE_TYPE_UNSPECIFIED
  286. }
  287. func (m *Profile) GetDeployment() *Deployment {
  288. if m != nil {
  289. return m.Deployment
  290. }
  291. return nil
  292. }
  293. func (m *Profile) GetDuration() *duration.Duration {
  294. if m != nil {
  295. return m.Duration
  296. }
  297. return nil
  298. }
  299. func (m *Profile) GetProfileBytes() []byte {
  300. if m != nil {
  301. return m.ProfileBytes
  302. }
  303. return nil
  304. }
  305. func (m *Profile) GetLabels() map[string]string {
  306. if m != nil {
  307. return m.Labels
  308. }
  309. return nil
  310. }
  311. // Deployment contains the deployment identification information.
  312. type Deployment struct {
  313. // Project ID is the ID of a cloud project.
  314. // Validation regex: `^[a-z][-a-z0-9:.]{4,61}[a-z0-9]$`.
  315. ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
  316. // Target is the service name used to group related deployments:
  317. // * Service name for GAE Flex / Standard.
  318. // * Cluster and container name for GKE.
  319. // * User-specified string for direct GCE profiling (e.g. Java).
  320. // * Job name for Dataflow.
  321. // Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
  322. Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
  323. // Labels identify the deployment within the user universe and same target.
  324. // Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
  325. // Value for an individual label must be <= 512 bytes, the total
  326. // size of all label names and values must be <= 1024 bytes.
  327. //
  328. // Label named "language" can be used to record the programming language of
  329. // the profiled deployment. The standard choices for the value include "java",
  330. // "go", "python", "ruby", "nodejs", "php", "dotnet".
  331. //
  332. // For deployments running on Google Cloud Platform, "zone" or "region" label
  333. // should be present describing the deployment location. An example of a zone
  334. // is "us-central1-a", an example of a region is "us-central1" or
  335. // "us-central".
  336. Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  337. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  338. XXX_unrecognized []byte `json:"-"`
  339. XXX_sizecache int32 `json:"-"`
  340. }
  341. func (m *Deployment) Reset() { *m = Deployment{} }
  342. func (m *Deployment) String() string { return proto.CompactTextString(m) }
  343. func (*Deployment) ProtoMessage() {}
  344. func (*Deployment) Descriptor() ([]byte, []int) {
  345. return fileDescriptor_profiler_7fa8c4ea33266c1c, []int{4}
  346. }
  347. func (m *Deployment) XXX_Unmarshal(b []byte) error {
  348. return xxx_messageInfo_Deployment.Unmarshal(m, b)
  349. }
  350. func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  351. return xxx_messageInfo_Deployment.Marshal(b, m, deterministic)
  352. }
  353. func (dst *Deployment) XXX_Merge(src proto.Message) {
  354. xxx_messageInfo_Deployment.Merge(dst, src)
  355. }
  356. func (m *Deployment) XXX_Size() int {
  357. return xxx_messageInfo_Deployment.Size(m)
  358. }
  359. func (m *Deployment) XXX_DiscardUnknown() {
  360. xxx_messageInfo_Deployment.DiscardUnknown(m)
  361. }
  362. var xxx_messageInfo_Deployment proto.InternalMessageInfo
  363. func (m *Deployment) GetProjectId() string {
  364. if m != nil {
  365. return m.ProjectId
  366. }
  367. return ""
  368. }
  369. func (m *Deployment) GetTarget() string {
  370. if m != nil {
  371. return m.Target
  372. }
  373. return ""
  374. }
  375. func (m *Deployment) GetLabels() map[string]string {
  376. if m != nil {
  377. return m.Labels
  378. }
  379. return nil
  380. }
  381. func init() {
  382. proto.RegisterType((*CreateProfileRequest)(nil), "google.devtools.cloudprofiler.v2.CreateProfileRequest")
  383. proto.RegisterType((*CreateOfflineProfileRequest)(nil), "google.devtools.cloudprofiler.v2.CreateOfflineProfileRequest")
  384. proto.RegisterType((*UpdateProfileRequest)(nil), "google.devtools.cloudprofiler.v2.UpdateProfileRequest")
  385. proto.RegisterType((*Profile)(nil), "google.devtools.cloudprofiler.v2.Profile")
  386. proto.RegisterMapType((map[string]string)(nil), "google.devtools.cloudprofiler.v2.Profile.LabelsEntry")
  387. proto.RegisterType((*Deployment)(nil), "google.devtools.cloudprofiler.v2.Deployment")
  388. proto.RegisterMapType((map[string]string)(nil), "google.devtools.cloudprofiler.v2.Deployment.LabelsEntry")
  389. proto.RegisterEnum("google.devtools.cloudprofiler.v2.ProfileType", ProfileType_name, ProfileType_value)
  390. }
  391. // Reference imports to suppress errors if they are not otherwise used.
  392. var _ context.Context
  393. var _ grpc.ClientConn
  394. // This is a compile-time assertion to ensure that this generated file
  395. // is compatible with the grpc package it is being compiled against.
  396. const _ = grpc.SupportPackageIsVersion4
  397. // ProfilerServiceClient is the client API for ProfilerService service.
  398. //
  399. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  400. type ProfilerServiceClient interface {
  401. // CreateProfile creates a new profile resource in the online mode.
  402. //
  403. // The server ensures that the new profiles are created at a constant rate per
  404. // deployment, so the creation request may hang for some time until the next
  405. // profile session is available.
  406. //
  407. // The request may fail with ABORTED error if the creation is not available
  408. // within ~1m, the response will indicate the duration of the backoff the
  409. // client should take before attempting creating a profile again. The backoff
  410. // duration is returned in google.rpc.RetryInfo extension on the response
  411. // status. To a gRPC client, the extension will be return as a
  412. // binary-serialized proto in the trailing metadata item named
  413. // "google.rpc.retryinfo-bin".
  414. CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
  415. // CreateOfflineProfile creates a new profile resource in the offline mode.
  416. // The client provides the profile to create along with the profile bytes, the
  417. // server records it.
  418. CreateOfflineProfile(ctx context.Context, in *CreateOfflineProfileRequest, opts ...grpc.CallOption) (*Profile, error)
  419. // UpdateProfile updates the profile bytes and labels on the profile resource
  420. // created in the online mode. Updating the bytes for profiles created in the
  421. // offline mode is currently not supported: the profile content must be
  422. // provided at the time of the profile creation.
  423. UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
  424. }
  425. type profilerServiceClient struct {
  426. cc *grpc.ClientConn
  427. }
  428. func NewProfilerServiceClient(cc *grpc.ClientConn) ProfilerServiceClient {
  429. return &profilerServiceClient{cc}
  430. }
  431. func (c *profilerServiceClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error) {
  432. out := new(Profile)
  433. err := c.cc.Invoke(ctx, "/google.devtools.cloudprofiler.v2.ProfilerService/CreateProfile", in, out, opts...)
  434. if err != nil {
  435. return nil, err
  436. }
  437. return out, nil
  438. }
  439. func (c *profilerServiceClient) CreateOfflineProfile(ctx context.Context, in *CreateOfflineProfileRequest, opts ...grpc.CallOption) (*Profile, error) {
  440. out := new(Profile)
  441. err := c.cc.Invoke(ctx, "/google.devtools.cloudprofiler.v2.ProfilerService/CreateOfflineProfile", in, out, opts...)
  442. if err != nil {
  443. return nil, err
  444. }
  445. return out, nil
  446. }
  447. func (c *profilerServiceClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error) {
  448. out := new(Profile)
  449. err := c.cc.Invoke(ctx, "/google.devtools.cloudprofiler.v2.ProfilerService/UpdateProfile", in, out, opts...)
  450. if err != nil {
  451. return nil, err
  452. }
  453. return out, nil
  454. }
  455. // ProfilerServiceServer is the server API for ProfilerService service.
  456. type ProfilerServiceServer interface {
  457. // CreateProfile creates a new profile resource in the online mode.
  458. //
  459. // The server ensures that the new profiles are created at a constant rate per
  460. // deployment, so the creation request may hang for some time until the next
  461. // profile session is available.
  462. //
  463. // The request may fail with ABORTED error if the creation is not available
  464. // within ~1m, the response will indicate the duration of the backoff the
  465. // client should take before attempting creating a profile again. The backoff
  466. // duration is returned in google.rpc.RetryInfo extension on the response
  467. // status. To a gRPC client, the extension will be return as a
  468. // binary-serialized proto in the trailing metadata item named
  469. // "google.rpc.retryinfo-bin".
  470. CreateProfile(context.Context, *CreateProfileRequest) (*Profile, error)
  471. // CreateOfflineProfile creates a new profile resource in the offline mode.
  472. // The client provides the profile to create along with the profile bytes, the
  473. // server records it.
  474. CreateOfflineProfile(context.Context, *CreateOfflineProfileRequest) (*Profile, error)
  475. // UpdateProfile updates the profile bytes and labels on the profile resource
  476. // created in the online mode. Updating the bytes for profiles created in the
  477. // offline mode is currently not supported: the profile content must be
  478. // provided at the time of the profile creation.
  479. UpdateProfile(context.Context, *UpdateProfileRequest) (*Profile, error)
  480. }
  481. func RegisterProfilerServiceServer(s *grpc.Server, srv ProfilerServiceServer) {
  482. s.RegisterService(&_ProfilerService_serviceDesc, srv)
  483. }
  484. func _ProfilerService_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  485. in := new(CreateProfileRequest)
  486. if err := dec(in); err != nil {
  487. return nil, err
  488. }
  489. if interceptor == nil {
  490. return srv.(ProfilerServiceServer).CreateProfile(ctx, in)
  491. }
  492. info := &grpc.UnaryServerInfo{
  493. Server: srv,
  494. FullMethod: "/google.devtools.cloudprofiler.v2.ProfilerService/CreateProfile",
  495. }
  496. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  497. return srv.(ProfilerServiceServer).CreateProfile(ctx, req.(*CreateProfileRequest))
  498. }
  499. return interceptor(ctx, in, info, handler)
  500. }
  501. func _ProfilerService_CreateOfflineProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  502. in := new(CreateOfflineProfileRequest)
  503. if err := dec(in); err != nil {
  504. return nil, err
  505. }
  506. if interceptor == nil {
  507. return srv.(ProfilerServiceServer).CreateOfflineProfile(ctx, in)
  508. }
  509. info := &grpc.UnaryServerInfo{
  510. Server: srv,
  511. FullMethod: "/google.devtools.cloudprofiler.v2.ProfilerService/CreateOfflineProfile",
  512. }
  513. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  514. return srv.(ProfilerServiceServer).CreateOfflineProfile(ctx, req.(*CreateOfflineProfileRequest))
  515. }
  516. return interceptor(ctx, in, info, handler)
  517. }
  518. func _ProfilerService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  519. in := new(UpdateProfileRequest)
  520. if err := dec(in); err != nil {
  521. return nil, err
  522. }
  523. if interceptor == nil {
  524. return srv.(ProfilerServiceServer).UpdateProfile(ctx, in)
  525. }
  526. info := &grpc.UnaryServerInfo{
  527. Server: srv,
  528. FullMethod: "/google.devtools.cloudprofiler.v2.ProfilerService/UpdateProfile",
  529. }
  530. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  531. return srv.(ProfilerServiceServer).UpdateProfile(ctx, req.(*UpdateProfileRequest))
  532. }
  533. return interceptor(ctx, in, info, handler)
  534. }
  535. var _ProfilerService_serviceDesc = grpc.ServiceDesc{
  536. ServiceName: "google.devtools.cloudprofiler.v2.ProfilerService",
  537. HandlerType: (*ProfilerServiceServer)(nil),
  538. Methods: []grpc.MethodDesc{
  539. {
  540. MethodName: "CreateProfile",
  541. Handler: _ProfilerService_CreateProfile_Handler,
  542. },
  543. {
  544. MethodName: "CreateOfflineProfile",
  545. Handler: _ProfilerService_CreateOfflineProfile_Handler,
  546. },
  547. {
  548. MethodName: "UpdateProfile",
  549. Handler: _ProfilerService_UpdateProfile_Handler,
  550. },
  551. },
  552. Streams: []grpc.StreamDesc{},
  553. Metadata: "google/devtools/cloudprofiler/v2/profiler.proto",
  554. }
  555. func init() {
  556. proto.RegisterFile("google/devtools/cloudprofiler/v2/profiler.proto", fileDescriptor_profiler_7fa8c4ea33266c1c)
  557. }
  558. var fileDescriptor_profiler_7fa8c4ea33266c1c = []byte{
  559. // 786 bytes of a gzipped FileDescriptorProto
  560. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5f, 0x6f, 0xda, 0x56,
  561. 0x14, 0xdf, 0xc5, 0x04, 0xc2, 0x71, 0xc8, 0xac, 0xab, 0x68, 0x62, 0x2c, 0xdb, 0x2c, 0x4f, 0x93,
  562. 0x18, 0xdb, 0x6c, 0xc9, 0x51, 0xa6, 0xfc, 0x51, 0x34, 0x11, 0x70, 0x14, 0x34, 0x02, 0x96, 0x43,
  563. 0x34, 0x6d, 0x2f, 0xc8, 0xe0, 0x0b, 0x72, 0x63, 0x6c, 0xd7, 0x36, 0x48, 0xb4, 0xca, 0x4b, 0xd5,
  564. 0x6f, 0xd0, 0x97, 0xbe, 0xf5, 0xa1, 0x0f, 0x7d, 0xea, 0x87, 0xe8, 0x17, 0xa8, 0x2a, 0xf5, 0x2b,
  565. 0xf4, 0x83, 0x54, 0xb6, 0xaf, 0x09, 0x24, 0x44, 0x90, 0xa6, 0x6f, 0xe7, 0xde, 0x7b, 0xce, 0xcf,
  566. 0xbf, 0xdf, 0xb9, 0xc7, 0x3f, 0x1b, 0xa4, 0x81, 0xe3, 0x0c, 0x2c, 0x22, 0x19, 0x64, 0x1c, 0x38,
  567. 0x8e, 0xe5, 0x4b, 0x3d, 0xcb, 0x19, 0x19, 0xae, 0xe7, 0xf4, 0x4d, 0x8b, 0x78, 0xd2, 0x58, 0x96,
  568. 0x92, 0x58, 0x74, 0x3d, 0x27, 0x70, 0x30, 0x1f, 0x17, 0x88, 0x49, 0x81, 0x38, 0x57, 0x20, 0x8e,
  569. 0xe5, 0xe2, 0x36, 0x85, 0xd4, 0x5d, 0x53, 0xd2, 0x6d, 0xdb, 0x09, 0xf4, 0xc0, 0x74, 0x6c, 0x3f,
  570. 0xae, 0x2f, 0xfe, 0x44, 0x4f, 0xa3, 0x55, 0x77, 0xd4, 0x97, 0x8c, 0x91, 0x17, 0x25, 0xd0, 0x73,
  571. 0xfe, 0xe6, 0x79, 0xdf, 0x24, 0x96, 0xd1, 0x19, 0xea, 0xfe, 0x25, 0xcd, 0xf8, 0xf9, 0x66, 0x46,
  572. 0x60, 0x0e, 0x89, 0x1f, 0xe8, 0x43, 0x37, 0x4e, 0x10, 0xde, 0x23, 0xd8, 0xaa, 0x7a, 0x44, 0x0f,
  573. 0x88, 0x1a, 0xd3, 0xd2, 0xc8, 0xe3, 0x11, 0xf1, 0x03, 0xfc, 0x1d, 0x64, 0x5c, 0xdd, 0x23, 0x76,
  574. 0x50, 0x48, 0xf3, 0xa8, 0x94, 0xd3, 0xe8, 0x0a, 0x37, 0x00, 0x0c, 0xe2, 0x5a, 0xce, 0x64, 0x18,
  575. 0x9e, 0x21, 0x1e, 0x95, 0x58, 0xf9, 0x0f, 0x71, 0x99, 0x50, 0xb1, 0x36, 0xad, 0xd1, 0x66, 0xea,
  576. 0xb1, 0x0a, 0x1b, 0x34, 0xab, 0x13, 0x4c, 0x5c, 0x52, 0x48, 0xf1, 0x4c, 0x69, 0x53, 0xfe, 0x73,
  577. 0x39, 0x1e, 0x65, 0xdb, 0x9e, 0xb8, 0x44, 0x63, 0xdd, 0xeb, 0x85, 0xf0, 0x04, 0x7e, 0x88, 0xf5,
  578. 0xb4, 0xfa, 0x7d, 0xcb, 0xb4, 0xef, 0x96, 0x85, 0xe6, 0x64, 0x55, 0x21, 0x4b, 0x51, 0x0a, 0xa9,
  579. 0x48, 0xd3, 0x6f, 0x2b, 0x73, 0xd0, 0x92, 0x4a, 0xe1, 0x25, 0x82, 0xad, 0x0b, 0xd7, 0xb8, 0xdd,
  580. 0xcc, 0x19, 0x74, 0xf4, 0xa5, 0xe8, 0xf8, 0x10, 0xd8, 0x51, 0x04, 0x1e, 0x5d, 0x30, 0xa5, 0x59,
  581. 0x4c, 0x80, 0x92, 0x1b, 0x16, 0x4f, 0xc2, 0x19, 0x38, 0xd3, 0xfd, 0x4b, 0x0d, 0xe2, 0xf4, 0x30,
  582. 0x16, 0x5e, 0x33, 0x90, 0xa5, 0x88, 0x18, 0x43, 0xda, 0xd6, 0x87, 0x84, 0x76, 0x20, 0x8a, 0x17,
  583. 0x5c, 0x04, 0x7a, 0xd8, 0x45, 0xdc, 0x18, 0x14, 0xe6, 0x81, 0x83, 0xb2, 0x0b, 0xeb, 0xc9, 0xf0,
  584. 0x47, 0x03, 0xc9, 0xca, 0xdf, 0xdf, 0x52, 0x5e, 0xa3, 0x09, 0xda, 0x34, 0x15, 0xff, 0x02, 0xf9,
  585. 0x44, 0x56, 0x77, 0x12, 0x10, 0xbf, 0xb0, 0xc6, 0xa3, 0xd2, 0x86, 0x96, 0x68, 0x3d, 0x0e, 0xf7,
  586. 0xf0, 0x19, 0x64, 0x2c, 0xbd, 0x4b, 0x2c, 0xbf, 0x90, 0xe1, 0x99, 0x12, 0x2b, 0xef, 0xae, 0xac,
  587. 0x5a, 0x6c, 0x44, 0x75, 0x8a, 0x1d, 0x78, 0x13, 0x8d, 0x82, 0x14, 0xf7, 0x81, 0x9d, 0xd9, 0xc6,
  588. 0x1c, 0x30, 0x97, 0x64, 0x42, 0x9b, 0x1d, 0x86, 0x78, 0x0b, 0xd6, 0xc6, 0xba, 0x35, 0x8a, 0x9b,
  589. 0x9c, 0xd3, 0xe2, 0xc5, 0x41, 0x6a, 0x0f, 0x09, 0x1f, 0x10, 0xc0, 0x75, 0x03, 0xf0, 0x8f, 0x00,
  590. 0xae, 0xe7, 0x3c, 0x22, 0xbd, 0xa0, 0x63, 0x1a, 0x14, 0x21, 0x47, 0x77, 0xea, 0x46, 0x38, 0xcb,
  591. 0x81, 0xee, 0x0d, 0x48, 0x40, 0x81, 0xe8, 0x0a, 0xab, 0x53, 0x3d, 0x4c, 0xa4, 0x67, 0xef, 0x3e,
  592. 0x5d, 0xff, 0xca, 0x92, 0xca, 0xcf, 0x11, 0xb0, 0x33, 0x33, 0x82, 0xb7, 0xa1, 0xa0, 0x6a, 0xad,
  593. 0x93, 0x7a, 0x43, 0xe9, 0xb4, 0xff, 0x53, 0x95, 0xce, 0x45, 0xf3, 0x5c, 0x55, 0xaa, 0xf5, 0x93,
  594. 0xba, 0x52, 0xe3, 0xbe, 0xc1, 0x59, 0x60, 0xaa, 0xea, 0x05, 0x87, 0xf0, 0x3a, 0xa4, 0xff, 0xad,
  595. 0x34, 0x1a, 0x5c, 0x2a, 0x8c, 0x4e, 0x95, 0x8a, 0xca, 0x31, 0x98, 0x85, 0x6c, 0xfb, 0x54, 0x53,
  596. 0x2a, 0xb5, 0x73, 0x2e, 0x8d, 0x37, 0x01, 0xaa, 0xad, 0x66, 0x5b, 0x69, 0xb6, 0xeb, 0xad, 0x26,
  597. 0xb7, 0x86, 0xf3, 0x90, 0x53, 0x95, 0xca, 0x3f, 0x9d, 0x28, 0x37, 0x13, 0x1e, 0x87, 0x51, 0xa7,
  598. 0xd2, 0x68, 0xb4, 0xaa, 0x5c, 0x56, 0x7e, 0x93, 0x86, 0x6f, 0x29, 0x0d, 0xef, 0x9c, 0x78, 0x63,
  599. 0xb3, 0x47, 0xf0, 0x2b, 0x04, 0xf9, 0x39, 0xef, 0xc3, 0x7f, 0x2d, 0xef, 0xd4, 0x22, 0xb3, 0x2c,
  600. 0xae, 0xfe, 0x3a, 0x0b, 0xbf, 0x3f, 0xfb, 0xf8, 0xe9, 0x45, 0xea, 0x57, 0x81, 0x0f, 0xbf, 0x17,
  601. 0x4f, 0x63, 0xf7, 0x39, 0xa2, 0x77, 0xea, 0x4b, 0xe5, 0xab, 0xe4, 0x1b, 0xe2, 0x1f, 0xa0, 0x32,
  602. 0x7e, 0x37, 0x75, 0xe7, 0x79, 0x37, 0xc3, 0x47, 0xab, 0x12, 0x5d, 0xe8, 0x82, 0xf7, 0xe1, 0xfb,
  603. 0x77, 0xc4, 0x77, 0x5f, 0x10, 0x97, 0xf2, 0xed, 0xcd, 0x3e, 0xf0, 0x60, 0x6a, 0x5b, 0x6f, 0x11,
  604. 0xe4, 0xe7, 0x4c, 0x71, 0x95, 0x2e, 0x2f, 0x72, 0xd1, 0xfb, 0xb0, 0xde, 0x8f, 0x58, 0xef, 0xc8,
  605. 0xa5, 0x98, 0x35, 0x7d, 0x5b, 0x43, 0xa7, 0x9b, 0xe1, 0x3e, 0xa5, 0x2e, 0x95, 0xaf, 0xa6, 0x7c,
  606. 0x8f, 0x5b, 0xff, 0x9f, 0xd1, 0xc7, 0x0c, 0x1c, 0x4b, 0xb7, 0x07, 0xa2, 0xe3, 0x0d, 0xa4, 0x01,
  607. 0xb1, 0x23, 0x9b, 0xa1, 0xbf, 0x00, 0xba, 0x6b, 0xfa, 0x77, 0xff, 0x06, 0x1c, 0xce, 0x6d, 0x74,
  608. 0x33, 0x51, 0xe5, 0xce, 0xe7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x08, 0x2b, 0x60, 0x3f, 0x08,
  609. 0x00, 0x00,
  610. }