Move build output from root to bin/ directory following Go conventions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f838547223
commit
17502ff139
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -41,7 +41,7 @@ cmake-build-debug
|
|||
/trunk/cmake/build
|
||||
|
||||
# proxy (Go)
|
||||
srs-proxy
|
||||
/bin/
|
||||
.go-formarted
|
||||
.env
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ env PROXY_RTMP_SERVER=$PROXY_RTMP_PORT \
|
|||
PROXY_SRT_SERVER=$PROXY_SRT_PORT \
|
||||
PROXY_SYSTEM_API=$PROXY_SYSTEM_API_PORT \
|
||||
PROXY_LOAD_BALANCER_TYPE=memory \
|
||||
./srs-proxy >/tmp/srs-proxy-e2e.log 2>&1 &
|
||||
./bin/srs-proxy >/tmp/srs-proxy-e2e.log 2>&1 &
|
||||
PROXY_PID=$!
|
||||
echo "Proxy PID: $PROXY_PID"
|
||||
sleep 1
|
||||
|
|
|
|||
9
Makefile
9
Makefile
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
all: build
|
||||
|
||||
build: fmt ./srs-proxy
|
||||
build: fmt bin/srs-proxy
|
||||
|
||||
./srs-proxy: cmd/proxy/*.go internal/**/*.go
|
||||
go build -o srs-proxy ./cmd/proxy
|
||||
bin/srs-proxy: cmd/proxy/*.go internal/**/*.go
|
||||
@mkdir -p bin
|
||||
go build -o bin/srs-proxy ./cmd/proxy
|
||||
|
||||
test:
|
||||
go test ./...
|
||||
|
|
@ -17,7 +18,7 @@ fmt: ./.go-formarted
|
|||
go fmt ./cmd/... ./internal/...
|
||||
|
||||
clean:
|
||||
rm -f srs-proxy .go-formarted
|
||||
rm -rf bin .go-formarted
|
||||
|
||||
run: fmt
|
||||
go run ./cmd/proxy
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ How to use the proxy server to build an origin cluster for SRS media server.
|
|||
## Build
|
||||
|
||||
To build the proxy server, you need to have Go 1.18+ installed. Then, you can build the proxy
|
||||
server by below command, and get the executable binary `./srs-proxy`:
|
||||
server by below command, and get the executable binary `bin/srs-proxy`:
|
||||
|
||||
```bash
|
||||
cd ~/git &&
|
||||
|
|
@ -43,7 +43,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
@ -96,7 +96,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
@ -145,7 +145,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ When running the project for testing or development, you should:
|
|||
```bash
|
||||
make && env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
The proxy server should start and listen on the configured ports.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Please see [Protocols](#protocols) for details.
|
|||
## Build
|
||||
|
||||
To build the proxy server, you need to have Go 1.18+ installed. Then, you can build the proxy
|
||||
server by below command, and get the executable binary `./srs-proxy`:
|
||||
server by below command, and get the executable binary `bin/srs-proxy`:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/ossrs/srs.git
|
||||
|
|
@ -71,7 +71,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
@ -124,7 +124,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
@ -173,7 +173,7 @@ First, start the proxy server:
|
|||
```bash
|
||||
env PROXY_RTMP_SERVER=1935 PROXY_HTTP_SERVER=8080 \
|
||||
PROXY_HTTP_API=1985 PROXY_WEBRTC_SERVER=8000 PROXY_SRT_SERVER=10080 \
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./srs-proxy
|
||||
PROXY_SYSTEM_API=12025 PROXY_LOAD_BALANCER_TYPE=memory ./bin/srs-proxy
|
||||
```
|
||||
|
||||
> Note: Here we use the memory load balancer, you can switch to `redis` if you want to run more
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user