Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
504720c1
Commit
504720c1
authored
Apr 15, 2018
by
Liuhaoyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init GrpcRuntimeService
parent
cbfefe30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
7 deletions
+42
-7
GrpcApplicationService.cs
src/SkyWalking.Core/Remote/GrpcApplicationService.cs
+6
-7
GrpcRuntimeService.cs
src/SkyWalking.Core/Remote/GrpcRuntimeService.cs
+36
-0
No files found.
src/SkyWalking.Core/Remote/GrpcApplicationService.cs
View file @
504720c1
...
@@ -18,9 +18,7 @@
...
@@ -18,9 +18,7 @@
using
System
;
using
System
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Net
;
using
System.Net
;
using
System.Net.Sockets
;
using
System.Threading
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
SkyWalking.Boot
;
using
SkyWalking.Boot
;
...
@@ -50,7 +48,7 @@ namespace SkyWalking.Remote
...
@@ -50,7 +48,7 @@ namespace SkyWalking.Remote
var
registerTime
=
DateTime
.
UtcNow
.
GetTimeMillis
();
var
registerTime
=
DateTime
.
UtcNow
.
GetTimeMillis
();
var
hostName
=
Dns
.
GetHostName
();
var
hostName
=
Dns
.
GetHostName
();
// var ipv4s = Dns.GetHostAddresses(hostName);
var
osInfo
=
new
OSInfo
var
osInfo
=
new
OSInfo
{
{
Hostname
=
hostName
,
Hostname
=
hostName
,
...
@@ -58,8 +56,10 @@ namespace SkyWalking.Remote
...
@@ -58,8 +56,10 @@ namespace SkyWalking.Remote
ProcessNo
=
Process
.
GetCurrentProcess
().
Id
ProcessNo
=
Process
.
GetCurrentProcess
().
Id
};
};
// foreach (var ipAddress in ipv4s.Where(x => x.AddressFamily == AddressFamily.InterNetwork))
// todo fix Device not configured
// osInfo.Ipv4S.Add(ipAddress.ToString());
//var ipv4s = Dns.GetHostAddresses(hostName);
//foreach (var ipAddress in ipv4s.Where(x => x.AddressFamily == AddressFamily.InterNetwork))
// osInfo.Ipv4S.Add(ipAddress.ToString());
var
applicationInstance
=
new
ApplicationInstance
var
applicationInstance
=
new
ApplicationInstance
{
{
...
@@ -75,8 +75,7 @@ namespace SkyWalking.Remote
...
@@ -75,8 +75,7 @@ namespace SkyWalking.Remote
}
}
protected
override
TimeSpan
Interval
{
get
;
}
=
TimeSpan
.
FromMinutes
(
1
);
protected
override
TimeSpan
Interval
{
get
;
}
=
TimeSpan
.
FromMinutes
(
1
);
protected
override
async
Task
Execute
(
CancellationToken
token
)
protected
override
async
Task
Execute
(
CancellationToken
token
)
{
{
var
instanceDiscoveryService
=
var
instanceDiscoveryService
=
...
...
src/SkyWalking.Core/Remote/GrpcRuntimeService.cs
0 → 100644
View file @
504720c1
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using
System
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
SkyWalking.Boot
;
namespace
SkyWalking.Remote
{
public
class
GrpcRuntimeService
:
TimerService
{
protected
override
TimeSpan
Interval
{
get
;
}
=
TimeSpan
.
FromSeconds
(
120
);
protected
override
Task
Execute
(
CancellationToken
token
)
{
// todo
return
Task
.
CompletedTask
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment