forked from liuxianloveqiqi/Gopan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathu.txt
67 lines (52 loc) · 3.52 KB
/
u.txt
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
goctl model mysql ddl -src file.sql -dir . -c
goctl api go -api filemeta.api -dir .
goctl rpc protoc filemeta.proto --go_out=./types --go-grpc_out=./types --zrpc_out=.
go run filemeta.go -f etc/filemeta.yaml
go run filemeta.go -f etc/filemeta-api.yaml
goctl model mysql datasource -url="root:123456@tcp(127.0.0.1:3306)/gopan" -table="*" -dir="./service/app/user/model"
redis-cli --cluster create 43.139.195.17:6379 43.139.195.17:6380 43.139.195.17:6381 43.139.195.17:6382 43.139.195.17:6383 43.139.195.17:6384 --cluster-replicas 1
docker build -t gopan-user-rpc -f ./app/user/rpc/Dockerfile .
docker run -it --privileged --pid=host justincormack/nsenter1
2023-07-06 00:23:39 2023/07/06 00:23:39 {"@timestamp":"2023-07-06T00:23:39.670+08","level":"error","content":"cpu_linux.go:29 open cpuacct.usage_percpu: no such file or directory"}
2023-07-06 00:24:39 {"@timestamp":"2023-07-06T00:24:39.674+08","level":"stat","content":"CPU: 0m, MEMORY: Alloc=2.1Mi, TotalAlloc=3.6Mi, Sys=14.5Mi, NumGC=1"}
2023-07-06 00:25:39 {"@timestamp":"2023-07-06T00:25:39.674+08","level":"stat","content":"CPU: 0m, MEMORY: Alloc=3.1Mi, TotalAlloc=4.7Mi, Sys=14.5Mi, NumGC=1"}
2023-07-06 00:26:39 {"@timestamp":"2023-07-06T00:26:39.675+08","level":"stat","content":"CPU: 0m, MEMORY: Alloc=2.0Mi, TotalAlloc=5.7Mi, Sys=15.1Mi, NumGC=2"}
./kafka-console-consumer.sh --bootstrap-server kafka:9092 --topic gopan-log --from-beginning
./kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 -partitions 1 --topic gopan-log
./kafka-topics.sh --create --bootstrap-server kafka:9092 --replication-factor 1 --partitions 1 --topic gopan-log
UserFile struct {
gorm.Model
Id int64 `gorm:"column:id;primaryKey" db:"id"`
UserName string `gorm:"column:user_name" db:"user_name"`
FileSha1 string `gorm:"column:file_sha1" db:"file_sha1"`
FileSize int64 `gorm:"column:file_size" db:"file_size"`
FileName string `gorm:"column:file_name" db:"file_name"`
CreateTime time.Time `gorm:"column:create_time" db:"create_time"`
UpdateTime time.Time `gorm:"column:update_time" db:"update_time"`
DeleteTime gorm.DeletedAt `gorm:"index " db:"delete_time"`
Status int64 `gorm:"column:status" db:"status"`
}
type File struct {
gorm.Model
Id int64 `gorm:"column:id;primaryKey" db:"id"`
FileSha1 string `gorm:"column:file_sha1" db:"file_sha1"`
FileName string `gorm:"column:file_name" db:"file_name"`
FileSize int64 `gorm:"column:file_size" db:"file_size"`
FileAddr string `gorm:"column:file_addr" db:"file_addr"`
Status int64 `gorm:"column:status" db:"status"`
CreateTime time.Time `gorm:"column:create_time" db:"create_time"`
UpdateTime time.Time `gorm:"column:update_time" db:"update_time"`
DeleteTime sql.NullTime `gorm:"column:delete_time" db:"delete_time"`
}
kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic gopan-upload --group gopan-upload-consume
minikube kubectl -- create deployment chess-chat-api --image=liuxian123/chess-chat-api
minikube kubectl -- expose deployment chess-chat-api --type=NodePort --port=4003
minikube kubectl -- delete deployment gopan-user-rpc
minikube kubectl -- delete deployment gopan-user-rpc
minikube tunnel
# ip地址
ifconfig en0
kubectl port-forward --address 0.0.0.0 -n chess app: gopan-user-rpc 3002:3002
kubectl port-forward service/chess-chat-api 4003:4003
/Applications/Docker.app/Contents/MacOS/Docker --uninstall
xxfffesf sefs e