FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gotask/src/ConfigProvider.php at master · hyperf/gotask · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
hyperf
/
gotask
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
29
Star
257
Code
Issues
15
Pull requests
3
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
gotask
/
src
/
ConfigProvider.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (80 loc) · 2.53 KB
Breadcrumbs
gotask
/
src
/
ConfigProvider.php
Copy path
File metadata and controls
87 lines (80 loc) · 2.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
declare
(strict_types=
1
);
/**
* This file is part of Hyperf/GoTask.
*
* @link https://www.github.com/hyperf/gotask
* @document https://www.github.com/hyperf/gotask
* @contact guxi99@gmail.com
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace
Hyperf
\
GoTask
;
use
Hyperf
\
GoTask
\
Listener
\
CommandListener
;
use
Hyperf
\
GoTask
\
Listener
\
Go2PhpListener
;
use
Hyperf
\
GoTask
\
Listener
\
LogRedirectListener
;
use
Hyperf
\
GoTask
\
Listener
\
PipeLockListener
;
use
Hyperf
\
GoTask
\
Process
\
GoTaskProcess
;
use
function
Hyperf
\
Support
\
env
;
class
ConfigProvider
{
public
function
__invoke
():
array
{
return
[
'
dependencies
'
=> [
GoTask::class => GoTaskFactory::class,
],
'
commands
'
=> [
],
'
processes
'
=> [
GoTaskProcess::class,
],
'
listeners
'
=> [
CommandListener::class,
PipeLockListener::class,
LogRedirectListener::class,
Go2PhpListener::class,
],
'
annotations
'
=> [
'
scan
'
=> [
'
paths
'
=> [
__DIR__
,
],
'
ignore_annotations
'
=> [
'
mixin
'
,
],
],
],
'
publish
'
=> [
[
'
id
'
=>
'
config
'
,
'
description
'
=>
'
The config for gotask.
'
,
'
source
'
=>
__DIR__
.
'
/../publish/gotask.php
'
,
'
destination
'
=>
BASE_PATH
.
'
/config/autoload/gotask.php
'
,
],
[
'
id
'
=>
'
app
'
,
'
description
'
=>
'
The go main package template for gotask.
'
,
'
source
'
=>
__DIR__
.
'
/../cmd/app.go
'
,
'
destination
'
=>
BASE_PATH
.
'
/gotask/cmd/app.go
'
,
],
[
'
id
'
=>
'
gomod
'
,
'
description
'
=>
'
The go.mod for gotask.
'
,
'
source
'
=>
__DIR__
.
'
/../publish/go.mod
'
,
'
destination
'
=>
BASE_PATH
.
'
/gotask/go.mod
'
,
],
],
];
}
public
static
function
address
():
string
{
if
(
defined
(
'
BASE_PATH
'
)) {
$
root
=
BASE_PATH
.
'
/runtime
'
;
}
else
{
$
root
=
'
/tmp
'
;
}
$
appName
=
env
(
'
APP_NAME
'
);
$
socketName
=
$
appName
.
'
_
'
.
uniqid
();
return
$
root
.
"
/
{
$
socketName
}
.sock
"
;
}
}
Back
|
FazBrowse Home
|
New Git URL