├── hybrid
├── provider
│ ├── build.sh
│ ├── .mvn
│ │ └── wrapper
│ │ │ ├── maven-wrapper.jar
│ │ │ └── maven-wrapper.properties
│ ├── Dockerfile
│ ├── start.sh
│ ├── .gitignore
│ └── src
│ │ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── demo
│ │ │ └── DemoApplicationTests.java
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── demo
│ │ │ ├── DemoApplication.java
│ │ │ ├── HelloImpl.java
│ │ │ └── HelloConsumer.java
│ │ └── resources
│ │ └── microservice.yaml
├── consumer
│ ├── build.sh
│ ├── Dockerfile
│ └── consumer.php
├── docs
│ ├── apollo-create-project.png
│ └── demo-with-servicecomb.png
└── infrastructure
│ └── kubernetes
│ ├── namespace.yaml
│ ├── uninstall.sh
│ └── install.sh
├── Go-Mesher-Example
├── client
│ ├── conf
│ │ └── app.conf
│ ├── start_client.sh
│ └── Dockerfile
├── prometheus
│ ├── Dockerfile
│ └── prometheus.yml
├── grafana
│ ├── prometheus-datasource.json
│ └── import.sh
├── mesher
│ ├── mesher-consumer
│ │ └── conf
│ │ │ ├── microservice.yaml
│ │ │ └── chassis.yaml
│ └── mesher-provider
│ │ └── conf
│ │ ├── microservice.yaml
│ │ └── chassis.yaml
└── server
│ └── Dockerfile
├── pilotv2-example
├── mesher
│ ├── mesher-consumer
│ │ ├── .gitignore
│ │ ├── conf
│ │ │ ├── auth.yaml
│ │ │ ├── microservice.yaml
│ │ │ ├── router.yaml
│ │ │ ├── mesher.yaml
│ │ │ ├── lager.yaml
│ │ │ ├── chassis.yaml
│ │ │ └── fault.yaml
│ │ ├── Makefile
│ │ └── Dockerfile
│ └── mesher-provider
│ │ ├── .gitignore
│ │ ├── conf
│ │ ├── microservice.yaml
│ │ └── chassis.yaml
│ │ ├── Makefile
│ │ └── Dockerfile
├── client
│ ├── build
│ │ ├── conf
│ │ │ └── app.conf
│ │ ├── Dockerfile
│ │ ├── service.yaml
│ │ └── distribute-image.sh
│ ├── Makefile
│ └── istio-destinationrule-reader.yaml
└── server
│ ├── build
│ ├── Dockerfile
│ ├── k8s
│ │ ├── destinationrule.yaml
│ │ └── service.yaml
│ └── distribute-image.sh
│ └── Makefile
├── protocol
└── grpc-go
│ ├── helloworld
│ ├── vendor
│ │ ├── google.golang.org
│ │ │ └── grpc
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── install_gae.sh
│ │ │ │ ├── reflection
│ │ │ │ └── README.md
│ │ │ │ ├── codegen.sh
│ │ │ │ ├── version.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── naming
│ │ │ │ ├── go18.go
│ │ │ │ └── go17.go
│ │ │ │ ├── resolver
│ │ │ │ └── dns
│ │ │ │ │ ├── go18.go
│ │ │ │ │ └── go17.go
│ │ │ │ ├── internal
│ │ │ │ ├── channelz
│ │ │ │ │ ├── util_nonlinux_pre_go19.go
│ │ │ │ │ ├── util_linux_go19.go
│ │ │ │ │ └── types_nonlinux.go
│ │ │ │ ├── envconfig
│ │ │ │ │ └── envconfig.go
│ │ │ │ ├── transport
│ │ │ │ │ ├── log.go
│ │ │ │ │ └── go16.go
│ │ │ │ ├── internal.go
│ │ │ │ └── grpcrand
│ │ │ │ │ └── grpcrand.go
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── credentials
│ │ │ │ ├── go19.go
│ │ │ │ └── go18.go
│ │ │ │ ├── Makefile
│ │ │ │ ├── examples
│ │ │ │ └── helloworld
│ │ │ │ │ └── helloworld
│ │ │ │ │ └── helloworld.proto
│ │ │ │ ├── backoff.go
│ │ │ │ ├── status
│ │ │ │ ├── go16.go
│ │ │ │ └── go17.go
│ │ │ │ ├── peer
│ │ │ │ └── peer.go
│ │ │ │ └── codes
│ │ │ │ └── code_string.go
│ │ ├── golang.org
│ │ │ └── x
│ │ │ │ ├── net
│ │ │ │ ├── http2
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── Makefile
│ │ │ │ │ ├── go16.go
│ │ │ │ │ ├── not_go19.go
│ │ │ │ │ ├── go19.go
│ │ │ │ │ ├── not_go16.go
│ │ │ │ │ ├── not_go111.go
│ │ │ │ │ ├── README
│ │ │ │ │ ├── go111.go
│ │ │ │ │ ├── not_go18.go
│ │ │ │ │ ├── flow.go
│ │ │ │ │ ├── go17_not18.go
│ │ │ │ │ ├── go18.go
│ │ │ │ │ └── Dockerfile
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── CONTRIBUTORS
│ │ │ │ ├── trace
│ │ │ │ │ ├── trace_go17.go
│ │ │ │ │ └── trace_go16.go
│ │ │ │ ├── context
│ │ │ │ │ └── go19.go
│ │ │ │ ├── PATENTS
│ │ │ │ ├── LICENSE
│ │ │ │ └── http
│ │ │ │ │ └── httpguts
│ │ │ │ │ └── guts.go
│ │ │ │ ├── sys
│ │ │ │ ├── unix
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── endian_big.go
│ │ │ │ │ ├── endian_little.go
│ │ │ │ │ ├── constants.go
│ │ │ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ │ │ ├── aliases.go
│ │ │ │ │ ├── pagesize_unix.go
│ │ │ │ │ ├── fcntl_linux_32bit.go
│ │ │ │ │ ├── asm_solaris_amd64.s
│ │ │ │ │ ├── gccgo_linux_amd64.go
│ │ │ │ │ ├── syscall_linux_gc.go
│ │ │ │ │ ├── race0.go
│ │ │ │ │ ├── syscall_solaris_amd64.go
│ │ │ │ │ ├── syscall_linux_gc_386.go
│ │ │ │ │ ├── syscall_unix_gc.go
│ │ │ │ │ ├── syscall_linux_gccgo_arm.go
│ │ │ │ │ ├── dirent.go
│ │ │ │ │ ├── str.go
│ │ │ │ │ ├── race.go
│ │ │ │ │ ├── env_unix.go
│ │ │ │ │ ├── asm_freebsd_arm.s
│ │ │ │ │ ├── asm_netbsd_arm.s
│ │ │ │ │ ├── asm_openbsd_arm.s
│ │ │ │ │ ├── asm_darwin_386.s
│ │ │ │ │ ├── asm_freebsd_386.s
│ │ │ │ │ ├── asm_netbsd_386.s
│ │ │ │ │ ├── asm_openbsd_386.s
│ │ │ │ │ ├── asm_darwin_amd64.s
│ │ │ │ │ ├── asm_freebsd_amd64.s
│ │ │ │ │ ├── asm_netbsd_amd64.s
│ │ │ │ │ ├── asm_openbsd_amd64.s
│ │ │ │ │ ├── asm_dragonfly_amd64.s
│ │ │ │ │ ├── asm_darwin_arm.s
│ │ │ │ │ ├── asm_darwin_arm64.s
│ │ │ │ │ ├── bluetooth_linux.go
│ │ │ │ │ ├── dev_darwin.go
│ │ │ │ │ ├── syscall_netbsd_amd64.go
│ │ │ │ │ ├── syscall_netbsd_386.go
│ │ │ │ │ ├── syscall_netbsd_arm.go
│ │ │ │ │ ├── syscall_openbsd_386.go
│ │ │ │ │ ├── syscall_openbsd_arm.go
│ │ │ │ │ ├── mksysnum_darwin.pl
│ │ │ │ │ ├── dev_netbsd.go
│ │ │ │ │ ├── dev_openbsd.go
│ │ │ │ │ ├── ioctl.go
│ │ │ │ │ ├── syscall_openbsd_amd64.go
│ │ │ │ │ ├── syscall_aix_ppc64.go
│ │ │ │ │ ├── fcntl.go
│ │ │ │ │ ├── syscall_aix_ppc.go
│ │ │ │ │ ├── syscall_linux_gccgo_386.go
│ │ │ │ │ ├── dev_freebsd.go
│ │ │ │ │ ├── dev_dragonfly.go
│ │ │ │ │ ├── sockcmsg_linux.go
│ │ │ │ │ ├── gccgo_c.c
│ │ │ │ │ ├── mksysnum_dragonfly.pl
│ │ │ │ │ ├── mksysnum_openbsd.pl
│ │ │ │ │ ├── mksysnum_freebsd.pl
│ │ │ │ │ ├── asm_linux_arm64.s
│ │ │ │ │ ├── asm_linux_arm.s
│ │ │ │ │ ├── asm_linux_s390x.s
│ │ │ │ │ ├── zptracearm_linux.go
│ │ │ │ │ ├── asm_linux_mipsx.s
│ │ │ │ │ ├── asm_linux_ppc64x.s
│ │ │ │ │ ├── asm_linux_mips64x.s
│ │ │ │ │ ├── syscall_freebsd_amd64.go
│ │ │ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ │ │ ├── asm_linux_amd64.s
│ │ │ │ │ ├── dev_aix_ppc.go
│ │ │ │ │ ├── syscall_freebsd_arm.go
│ │ │ │ │ ├── syscall_freebsd_386.go
│ │ │ │ │ ├── mksysnum_netbsd.pl
│ │ │ │ │ ├── dev_aix_ppc64.go
│ │ │ │ │ ├── zptracemips_linux.go
│ │ │ │ │ ├── zptracemipsle_linux.go
│ │ │ │ │ ├── asm_linux_386.s
│ │ │ │ │ └── dev_linux.go
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── CONTRIBUTORS
│ │ │ │ ├── PATENTS
│ │ │ │ └── LICENSE
│ │ │ │ └── text
│ │ │ │ ├── AUTHORS
│ │ │ │ ├── CONTRIBUTORS
│ │ │ │ ├── language
│ │ │ │ ├── go1_2.go
│ │ │ │ ├── common.go
│ │ │ │ ├── Makefile
│ │ │ │ ├── gen_common.go
│ │ │ │ └── go1_1.go
│ │ │ │ ├── secure
│ │ │ │ └── bidirule
│ │ │ │ │ ├── bidirule10.0.0.go
│ │ │ │ │ └── bidirule9.0.0.go
│ │ │ │ ├── collate
│ │ │ │ └── index.go
│ │ │ │ ├── PATENTS
│ │ │ │ ├── internal
│ │ │ │ └── colltab
│ │ │ │ │ └── weighter.go
│ │ │ │ ├── unicode
│ │ │ │ └── norm
│ │ │ │ │ └── trie.go
│ │ │ │ └── LICENSE
│ │ └── github.com
│ │ │ └── golang
│ │ │ └── protobuf
│ │ │ ├── AUTHORS
│ │ │ ├── CONTRIBUTORS
│ │ │ └── LICENSE
│ ├── launch.sh
│ ├── greeter_client
│ │ └── Dockerfile
│ ├── greeter_server
│ │ ├── Dockerfile
│ │ └── Gopkg.toml
│ ├── docker-compose.yml
│ └── helloworld
│ │ └── helloworld.proto
│ └── README.md
├── echosystem
└── tensorflow
│ └── README.md
├── Infrastructure
├── kubernetes
│ ├── istio
│ │ └── README.md
│ └── servicecomb
│ │ ├── client
│ │ ├── build.sh
│ │ ├── Dockerfile
│ │ ├── client.yaml
│ │ ├── client.go
│ │ └── client-mesher.yaml
│ │ ├── server
│ │ ├── build.sh
│ │ ├── server.go
│ │ ├── Dockerfile
│ │ └── server-mesher.yaml
│ │ └── README.md
└── docker-compose
│ └── README.md
├── NOTICE
├── PHP-Mesher-Example
├── mesher.png
├── client
│ ├── Dockerfile
│ └── client.php
├── server
│ ├── Dockerfile
│ ├── data.php
│ └── api.php
├── README.md
└── docker-compose.yml
└── java-ws-Mesher-Example
├── mesher-jax-ws-server
├── src
│ └── main
│ │ └── java
│ │ ├── META-INF
│ │ └── MANIFEST.MF
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── MANIFEST.MF
│ │ ├── launch.sh
│ │ └── com
│ │ └── mesher
│ │ ├── ws
│ │ ├── HelloWorld.java
│ │ └── HelloWorldImpl.java
│ │ └── endpoint
│ │ └── HelloWorldPublisher.java
└── pom.xml
├── mesher-jax-ws-client
├── web
│ ├── WEB-INF
│ │ └── web.xml
│ └── index.jsp
└── src
│ ├── com
│ └── mesher
│ │ ├── ws
│ │ └── HelloWorld.java
│ │ ├── myproxy
│ │ └── myProxySelector.java
│ │ └── client
│ │ └── HelloWorldClient.java
│ └── iServlet
│ └── helloWorldServlet.java
└── README.md
/hybrid/provider/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | mvn clean install
--------------------------------------------------------------------------------
/Go-Mesher-Example/client/conf/app.conf:
--------------------------------------------------------------------------------
1 | PROVIDER_ADDR=http://Server:3001
2 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/.gitignore:
--------------------------------------------------------------------------------
1 | mesher
2 | mesher.tar.gz
3 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-provider/.gitignore:
--------------------------------------------------------------------------------
1 | mesher
2 | mesher.tar.gz
3 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/AUTHORS:
--------------------------------------------------------------------------------
1 | Google Inc.
2 |
--------------------------------------------------------------------------------
/pilotv2-example/client/build/conf/app.conf:
--------------------------------------------------------------------------------
1 | PROVIDER_ADDR=http://pilotv2server:3001
2 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | h2i/h2i
3 |
--------------------------------------------------------------------------------
/echosystem/tensorflow/README.md:
--------------------------------------------------------------------------------
1 | docker run -it -p hostPort:containerPort TensorFlowCPUImage
--------------------------------------------------------------------------------
/hybrid/consumer/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | docker build -t gomesh/helloconsumer:latest .
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/prometheus/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM prom/prometheus
2 | ADD prometheus.yml /etc/prometheus/
3 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/istio/README.md:
--------------------------------------------------------------------------------
1 | A example to show how to run mesher with Istio
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | mesher
2 | Copyright 2018-present, Huawei
3 |
4 | This product includes software developed at
5 | Huawei.
6 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/mesher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/go-mesh/mesher-examples/HEAD/PHP-Mesher-Example/mesher.png
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/Makefile:
--------------------------------------------------------------------------------
1 | curlimage:
2 | docker build -t gohttp2/curl .
3 |
4 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/client/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | sudo docker build -t xiaoliang/client-go .
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/server/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | sudo docker build -t xiaoliang/server-go .
--------------------------------------------------------------------------------
/hybrid/docs/apollo-create-project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/go-mesh/mesher-examples/HEAD/hybrid/docs/apollo-create-project.png
--------------------------------------------------------------------------------
/hybrid/docs/demo-with-servicecomb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/go-mesh/mesher-examples/HEAD/hybrid/docs/demo-with-servicecomb.png
--------------------------------------------------------------------------------
/Go-Mesher-Example/client/start_client.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -x
4 |
5 | name="serviceclient"
6 | cd /tmp/service-client/$name
7 | ./clientapp
--------------------------------------------------------------------------------
/hybrid/provider/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/go-mesh/mesher-examples/HEAD/hybrid/provider/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/launch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | cp -r ./vendor ./greeter_client/
3 | cp -r ./vendor ./greeter_server/
4 |
5 | sudo docker-compose up
--------------------------------------------------------------------------------
/hybrid/provider/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
2 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Main-Class: com.mesher.endpoint.HelloWorldPublisher
3 |
4 |
--------------------------------------------------------------------------------
/pilotv2-example/server/build/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine
2 | COPY ./pilotv2server /root/
3 |
4 | RUN chmod +x /root/pilotv2server
5 |
6 | CMD ["/root/pilotv2server"]
7 |
--------------------------------------------------------------------------------
/hybrid/infrastructure/kubernetes/namespace.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # Source: servicecomb/templates/namespace.yaml
3 | apiVersion: v1
4 | kind: Namespace
5 | metadata:
6 | name: servicecomb
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Main-Class: com.mesher.endpoint.HelloWorldPublisher
3 |
4 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/grafana/prometheus-datasource.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mesher-demo",
3 | "type": "prometheus",
4 | "url": "http://MyPrometheus:9090",
5 | "access": "proxy"
6 | }
7 |
--------------------------------------------------------------------------------
/hybrid/consumer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:5.6-apache
2 | COPY ./consumer.php /var/www/html
3 |
4 | ENV Item pen
5 |
6 | EXPOSE 80
7 |
8 | CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
9 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/client/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:5.6-apache
2 | COPY ./client.php /var/www/html
3 |
4 | ENV Item pen
5 |
6 | EXPOSE 80
7 |
8 | CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
9 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/server/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:5.6-apache
2 | COPY ./api.php /var/www/html
3 | COPY ./data.php /var/www/html
4 |
5 | EXPOSE 80
6 |
7 | CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
8 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/launch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | javac com/mesher/endpoint/HelloWorldPublisher.java com/mesher/ws/*.java
3 | java com.mesher.endpoint.HelloWorldPublisher
--------------------------------------------------------------------------------
/Infrastructure/docker-compose/README.md:
--------------------------------------------------------------------------------
1 | A example to show how to run mesher with docker compose
2 | # Get Started
3 | see
4 | https://github.com/go-mesh/mesher-examples/tree/master/Go-Mesher-Example
5 |
6 |
7 |
--------------------------------------------------------------------------------
/hybrid/provider/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jre-alpine
2 |
3 | WORKDIR /home/apps/
4 |
5 | ADD start.sh .
6 |
7 | ADD target/provider-0.0.1-SNAPSHOT.jar .
8 |
9 | ENTRYPOINT ["sh", "-x", "/home/apps/start.sh"]
--------------------------------------------------------------------------------
/pilotv2-example/client/build/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine
2 | COPY ./pilotv2client /root/
3 | COPY ./conf /root/conf
4 |
5 | RUN chmod +x /root/pilotv2client
6 |
7 | WORKDIR /root/
8 | CMD ["/root/pilotv2client"]
9 |
10 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/conf/auth.yaml:
--------------------------------------------------------------------------------
1 | ## Huawei Public Cloud ak/sk
2 | cse:
3 | credentials:
4 | accessKey:
5 | secretKey:
6 | project:
7 | akskCustomCipher: default #used to decrypt sk when it is encrypted
8 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/github.com/golang/protobuf/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/github.com/golang/protobuf/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/hybrid/infrastructure/kubernetes/uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -x
4 | set -e
5 |
6 | SCRIPT_PATH=$(cd $(dirname $0);pwd)
7 |
8 | kubectl delete -f ${SCRIPT_PATH}/apollo.yaml
9 | kubectl delete -f ${SCRIPT_PATH}/servicecomb.yaml
10 | kubectl delete -f ${SCRIPT_PATH}/namespace.yaml
11 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/server/server.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "net/http"
5 | )
6 |
7 | func main() {
8 | http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
9 | w.Write([]byte("hello"))
10 |
11 | })
12 | http.ListenAndServe(":9999", nil)
13 | }
14 |
--------------------------------------------------------------------------------
/hybrid/consumer/consumer.php:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/hybrid/provider/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # CMDVAR="-Djava.security.egd=file:/dev/./urandom","java -agentlib:jdwp=transport=dt_socket,address=0:8000,server=y,suspend=n -jar"
4 | java $CMDVAR \
5 | -Dcse.service.registry.address="${REGISTRY:-"http://127.0.0.1:30100"}" \
6 | -jar ./provider-0.0.1-SNAPSHOT.jar
7 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/conf/microservice.yaml:
--------------------------------------------------------------------------------
1 | ## microservice property
2 | APPLICATION_ID: mesher
3 | service_description:
4 | name: mesher-consumer
5 | version: 0.0.1
6 | environment: #microservice environment
7 | properties:
8 | allowCrossApp: false #whether to allow calls across applications
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-provider/conf/microservice.yaml:
--------------------------------------------------------------------------------
1 | ## microservice property
2 | APPLICATION_ID: mesher
3 | service_description:
4 | name: mesher-provider
5 | version: 0.0.1
6 | environment: #microservice environment
7 | properties:
8 | allowCrossApp: false #whether to allow calls across applications
--------------------------------------------------------------------------------
/Go-Mesher-Example/mesher/mesher-consumer/conf/microservice.yaml:
--------------------------------------------------------------------------------
1 | ## microservice property
2 | APPLICATION_ID: mesher
3 | service_description:
4 | name: mesher-consumer
5 | version: 0.0.1
6 | environment: #microservice environment
7 | properties:
8 | allowCrossApp: false #whether to allow calls across applications
--------------------------------------------------------------------------------
/Go-Mesher-Example/mesher/mesher-provider/conf/microservice.yaml:
--------------------------------------------------------------------------------
1 | ## microservice property
2 | APPLICATION_ID: mesher
3 | service_description:
4 | name: mesher-provider
5 | version: 0.0.1
6 | environment: #microservice environment
7 | properties:
8 | allowCrossApp: false #whether to allow calls across applications
--------------------------------------------------------------------------------
/PHP-Mesher-Example/server/data.php:
--------------------------------------------------------------------------------
1 | 20,
7 | "pen"=>10,
8 | "pencil"=>5
9 | ];
10 |
11 | foreach($products as $product=>$price)
12 | {
13 | if($product==$name)
14 | {
15 | return $price;
16 | break;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/install_gae.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | TMP=$(mktemp -d /tmp/sdk.XXX) \
4 | && curl -o $TMP.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.64.zip" \
5 | && unzip -q $TMP.zip -d $TMP \
6 | && export PATH="$PATH:$TMP/go_appengine"
7 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/README.md:
--------------------------------------------------------------------------------
1 | A example to show how to run mesher with ServiceComb service center in kubernetes
2 |
3 | # Get Started
4 |
5 | 1. kubectl create -f https://github.com/go-mesh/mesher-examples/blob/master/Infrastructure/kubernetes/servicecomb/k8s-example.yaml
6 | 2. verify, curl http://NODEIP:30106/
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/language/go1_2.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | var sortStable = sort.Stable
12 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/client/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:latest
2 | ADD . /go/src/github.com/go-mesh/mesher-examples/Go-Mesher-Example/client
3 | WORKDIR /go/src/github.com/go-mesh/mesher-examples/Go-Mesher-Example/client
4 | RUN go get github.com/tedsuo/rata
5 | RUN go install github.com/go-mesh/mesher-examples/Go-Mesher-Example/client
6 | ENTRYPOINT /go/bin/client
7 | EXPOSE 3000
8 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/server/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:latest
2 | ADD . /go/src/github.com/go-mesh/mesher-examples/Go-Mesher-Example/server
3 | WORKDIR /go/src/github.com/go-mesh/mesher-examples/Go-Mesher-Example/server
4 | RUN go get github.com/tedsuo/rata
5 | RUN go install github.com/go-mesh/mesher-examples/Go-Mesher-Example/server
6 | ENTRYPOINT /go/bin/server
7 | EXPOSE 3000
8 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/web/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/client/client.php:
--------------------------------------------------------------------------------
1 | data;
13 | ?>
14 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/src/com/mesher/ws/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.mesher.ws;
2 |
3 | import javax.jws.WebMethod;
4 | import javax.jws.WebService;
5 | import javax.jws.soap.SOAPBinding;
6 |
7 | @WebService
8 | @SOAPBinding(style = SOAPBinding.Style.RPC)
9 | public interface HelloWorld {
10 | @WebMethod
11 | String helloWorld(String name);
12 | }
13 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/com/mesher/ws/HelloWorld.java:
--------------------------------------------------------------------------------
1 | package com.mesher.ws;
2 |
3 | import javax.jws.WebMethod;
4 | import javax.jws.WebService;
5 | import javax.jws.soap.SOAPBinding;
6 |
7 | @WebService
8 | @SOAPBinding(style = SOAPBinding.Style.RPC)
9 | public interface HelloWorld {
10 | @WebMethod
11 | String helloWorld(String name);
12 | }
13 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/greeter_client/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.11
2 | ADD . /go/src/github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_client
3 | WORKDIR /go/src/github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_client
4 |
5 | RUN go install github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_client
6 | ENTRYPOINT /go/bin/greeter_client
7 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/greeter_server/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.11
2 | ADD . /go/src/github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_server
3 | WORKDIR /go/src/github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_server
4 |
5 | RUN go install github.com/go-mesh/mesher-examples/protocol/grpc-go/helloworld/greeter_server
6 | ENTRYPOINT /go/bin/greeter_server
7 |
--------------------------------------------------------------------------------
/hybrid/provider/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/pilotv2-example/client/build/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: pilotv2client
6 | name: pilotv2client
7 | namespace: default
8 | spec:
9 | ports:
10 | - name: rest
11 | port: 3000
12 | protocol: TCP
13 | - name: mesher
14 | port: 30101
15 | protocol: TCP
16 | selector:
17 | name: pilotv2client
18 | type: ClusterIP
19 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | all: docker tar
4 | distribute-image.sh go-chassis/consumer-mesher:latest
5 |
6 | tar:
7 | # CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w' -o ./build/pilotv2server
8 | tar zcf mesher.tar.gz mesher conf
9 |
10 | docker: tar
11 | docker build -t go-chassis/consumer-mesher:latest ./
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-provider/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | all: docker tar
4 | distribute-image.sh go-chassis/provider-mesher:latest
5 |
6 | tar:
7 | # CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w' -o ./build/pilotv2server
8 | tar zcf mesher.tar.gz mesher conf
9 |
10 | docker: tar
11 | docker build -t go-chassis/provider-mesher:latest ./
12 |
13 |
14 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/client/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.10.2 as builder
2 | WORKDIR /go/src/github.com/go-mesh/mesher-tools/
3 | COPY client.go .
4 | RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o client .
5 |
6 | FROM alpine:latest
7 | RUN apk --no-cache add ca-certificates
8 | WORKDIR /root/
9 | COPY --from=builder /go/src/github.com/go-mesh/mesher-tools/client .
10 | ENTRYPOINT ["./client"]
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/server/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:1.10.2 as builder
2 | WORKDIR /go/src/github.com/go-mesh/mesher-tools/
3 | COPY server.go .
4 | RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server .
5 |
6 | FROM alpine:latest
7 | RUN apk --no-cache add ca-certificates
8 | WORKDIR /root/
9 | COPY --from=builder /go/src/github.com/go-mesh/mesher-tools/server .
10 | ENTRYPOINT ["./server"]
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/com/mesher/ws/HelloWorldImpl.java:
--------------------------------------------------------------------------------
1 | package com.mesher.ws;
2 |
3 | import javax.jws.WebService;
4 |
5 |
6 | //
7 | @WebService(endpointInterface = "com.mesher.ws.HelloWorld")
8 | public class HelloWorldImpl implements HelloWorld {
9 |
10 | public String helloWorld (String name) {
11 | return "Hello World mesher -> JAX-WS :"+name;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/conf/router.yaml:
--------------------------------------------------------------------------------
1 | router:
2 | infra: cse # router rule comes from where
3 | routeRule:
4 | pilotv2server:
5 | - precedence: 2
6 | route:
7 | - tags:
8 | version: v1
9 | weight: 40
10 | - tags:
11 | version: v2
12 | debug: true
13 | weight: 40
14 | - tags:
15 | version: v3
16 | weight: 20
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/prometheus/prometheus.yml:
--------------------------------------------------------------------------------
1 | global:
2 | scrape_interval: 5s
3 | evaluation_interval: 30s
4 |
5 | scrape_configs:
6 | - job_name: mesherserver
7 | metrics_path: '/v1/mesher/metrics'
8 | static_configs:
9 | - targets: ['MesherProvider:30102']
10 | - job_name: mesherclient
11 | metrics_path: '/v1/mesher/metrics'
12 | static_configs:
13 | - targets: ['MesherConsumer:30102']
14 |
15 |
16 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/web/index.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Created by IntelliJ IDEA.
3 | User: Administrator
4 | Date: 2018/09/28
5 | Time: 11:01
6 | To change this template use File | Settings | File Templates.
7 | --%>
8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
9 |
10 |
11 | jax ws
12 |
13 |
14 | Hello world
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pilotv2-example/server/build/k8s/destinationrule.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: networking.istio.io/v1alpha3
2 | kind: DestinationRule
3 | metadata:
4 | name: pilotv2server
5 | spec:
6 | host: pilotv2server
7 | subsets:
8 | - name: v1
9 | labels:
10 | version: v1
11 | - name: v2
12 | labels:
13 | version: v2
14 | ver: v2
15 | debug: "true"
16 | - name: v3
17 | labels:
18 | version: v3
19 | ---
20 |
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
11 | }
12 |
--------------------------------------------------------------------------------
/pilotv2-example/server/build/k8s/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | name: pilotv2server
6 | name: pilotv2server
7 | namespace: default
8 | spec:
9 | ports:
10 | - name: rest
11 | port: 3001
12 | protocol: TCP
13 | targetPort: 3001
14 | - name: mesher
15 | port: 30101
16 | protocol: TCP
17 | targetPort: 30101
18 | selector:
19 | name: pilotv2server
20 | type: ClusterIP
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/go16.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.6
6 |
7 | package http2
8 |
9 | import (
10 | "net/http"
11 | "time"
12 | )
13 |
14 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
15 | return t1.ExpectContinueTimeout
16 | }
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/not_go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.9
6 |
7 | package http2
8 |
9 | import (
10 | "net/http"
11 | )
12 |
13 | func configureServer19(s *http.Server, conf *Server) error {
14 | // not supported prior to go1.9
15 | return nil
16 | }
17 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/mesher/mesher-provider/conf/chassis.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | cse:
3 | protocols:
4 | http:
5 | listenAddress: 127.0.0.1:30104
6 | service:
7 | registry:
8 | address: http://127.0.0.1:30100 # uri of service center
9 | scope: full #set full to be able to discover other app's service
10 | watch: false # set if you want to watch instance change event
11 | autoIPIndex: true # set to true if u want to resolve source IP to microservice
--------------------------------------------------------------------------------
/hybrid/infrastructure/kubernetes/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -x
4 | set -e
5 |
6 | SCRIPT_PATH=$(cd $(dirname $0);pwd)
7 |
8 | kubectl apply -f ${SCRIPT_PATH}/namespace.yaml
9 |
10 | bash -x ${SCRIPT_PATH}/signed-cert.sh --service sidecar-injector-webhook-mesher-svc \
11 | --secret sidecar-injector-webhook-mesher-certs --namespace "servicecomb"
12 |
13 | kubectl apply -f ${SCRIPT_PATH}/servicecomb.yaml
14 |
15 | kubectl apply -f ${SCRIPT_PATH}/apollo.yaml
16 |
--------------------------------------------------------------------------------
/hybrid/provider/src/test/java/com/example/demo/DemoApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class DemoApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.9
6 |
7 | package http2
8 |
9 | import (
10 | "net/http"
11 | )
12 |
13 | func configureServer19(s *http.Server, conf *Server) error {
14 | s.RegisterOnShutdown(conf.state.startGracefulShutdown)
15 | return nil
16 | }
17 |
--------------------------------------------------------------------------------
/pilotv2-example/client/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | all: binary docker distribute restart
4 |
5 | binary:
6 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w' -o ./build/pilotv2client
7 |
8 | docker: binary
9 | docker build -t go-chassis/pilotv2client:latest ./build
10 |
11 | distribute:
12 | ./build/distribute-image.sh go-chassis/pilotv2client:latest
13 |
14 | restart:
15 | -kubectl delete -f ./build/
16 | kubectl apply -f ./build/
17 |
18 |
--------------------------------------------------------------------------------
/pilotv2-example/server/Makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | all: binary docker distribute restart
4 |
5 | binary:
6 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w' -o ./build/pilotv2server
7 |
8 | docker: binary
9 | docker build -t go-chassis/pilotv2server:latest ./build
10 |
11 | distribute:
12 | ./build/distribute-image.sh go-chassis/pilotv2server:latest
13 |
14 | restart:
15 | - kubectl delete -f ./build/k8s/
16 | - kubectl apply -f ./build/k8s/
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build go1.9
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | type Signal = syscall.Signal
13 | type Errno = syscall.Errno
14 | type SysProcAttr = syscall.SysProcAttr
15 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.10
6 |
7 | package bidirule
8 |
9 | func (t *Transformer) isFinal() bool {
10 | if !t.isRTL() {
11 | return true
12 | }
13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial
14 | }
15 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/language/common.go:
--------------------------------------------------------------------------------
1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
2 |
3 | package language
4 |
5 | // This file contains code common to the maketables.go and the package code.
6 |
7 | // langAliasType is the type of an alias in langAliasMap.
8 | type langAliasType int8
9 |
10 | const (
11 | langDeprecated langAliasType = iota
12 | langMacro
13 | langLegacy
14 |
15 | langAliasTypeUnknown langAliasType = -1
16 | )
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm linux,mips linux,mipsle
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/hybrid/provider/src/main/java/com/example/demo/DemoApplication.java:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.apache.servicecomb.springboot.starter.provider.EnableServiceComb;
6 |
7 | @SpringBootApplication
8 | @EnableServiceComb
9 | public class DemoApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(DemoApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | com.huawei
8 | mesher-jax-ws-exmple
9 | 1.0-SNAPSHOT
10 |
11 |
12 |
--------------------------------------------------------------------------------
/hybrid/provider/src/main/resources/microservice.yaml:
--------------------------------------------------------------------------------
1 | APPLICATION_ID: default
2 | service_description:
3 | name: hello-provider
4 | version: 0.0.1
5 | servicecomb:
6 | flowcontrol:
7 | Provider:
8 | qps:
9 | limit:
10 | gateway: 1000
11 | handler:
12 | chain:
13 | Provider:
14 | default: qps-flowcontrol-provider,tracing-provider
15 | rest:
16 | address: 0.0.0.0:9080
17 | service:
18 | registry:
19 | address: http://127.0.0.1:30100
20 | autodiscovery: false
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/language/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright 2013 The Go Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style
3 | # license that can be found in the LICENSE file.
4 |
5 | CLEANFILES+=maketables
6 |
7 | maketables: maketables.go
8 | go build $^
9 |
10 | tables: maketables
11 | ./maketables > tables.go
12 | gofmt -w -s tables.go
13 |
14 | # Build (but do not run) maketables during testing,
15 | # just to make sure it still compiles.
16 | testshort: maketables
17 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/README.md:
--------------------------------------------------------------------------------
1 | # PHP-Mesher-Example
2 |
3 |
4 | 1) using dockercompose build the container image of php server and php client and start the the container along with mesher
5 |
6 | docker-compose up
7 | 2) To verify the php client and php server communication
8 |
9 | curl request http://[ipaddress of the client]:8888/client.php
10 | ```
11 | curl http://127.0.0.1:8888/client.php
12 |
13 | OUTPUT:
14 | 10
15 | ```
16 |
17 | ## Diagram
18 |
19 | 
20 |
21 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/conf/mesher.yaml:
--------------------------------------------------------------------------------
1 | ## Router rules and fault injection rules are moved to router.yaml
2 | #plugin:
3 | # destinationResolver:
4 | # http: host # how to turn host to destination name. default to service name,
5 |
6 | ##admin: #admin API
7 | # goRuntimeMetrics : true # enable metrics
8 |
9 | ## enable pprof to profile mesher runtime
10 | #pprof:
11 | # enable: false
12 |
13 | #localHealthCheck:
14 | # - port: 8080
15 | # uri: /health
16 | # interval: 30s
17 | # match:
18 | # status: 200
19 | # body: ok
20 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-provider/conf/chassis.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | cse:
3 | protocols:
4 | http:
5 | listenAddress: 127.0.0.1:30101
6 | service:
7 | registry:
8 | type: pilotv2
9 | address: grpc://istio-pilot.istio-system:15010 # uri of service center
10 | # scope: full #set full to be able to discover other app's service
11 | # watch: false # set if you want to watch instance change event
12 | autoIPIndex: true # set to true if u want to resolve source IP to microservice
13 | registrator:
14 | disabled: true
15 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/not_go16.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.6
6 |
7 | package http2
8 |
9 | import (
10 | "net/http"
11 | "time"
12 | )
13 |
14 | func configureTransport(t1 *http.Transport) (*Transport, error) {
15 | return nil, errTransportVersion
16 | }
17 |
18 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration {
19 | return 0
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo,linux,amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/not_go111.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.11
6 |
7 | package http2
8 |
9 | import "net/textproto"
10 |
11 | func traceHasWroteHeaderField(trace *clientTrace) bool { return false }
12 |
13 | func traceWroteHeaderField(trace *clientTrace, k, v string) {}
14 |
15 | func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error {
16 | return nil
17 | }
18 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/reflection/README.md:
--------------------------------------------------------------------------------
1 | # Reflection
2 |
3 | Package reflection implements server reflection service.
4 |
5 | The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto.
6 |
7 | To register server reflection on a gRPC server:
8 | ```go
9 | import "google.golang.org/grpc/reflection"
10 |
11 | s := grpc.NewServer()
12 | pb.RegisterYourOwnServer(s, &server{})
13 |
14 | // Register reflection service on gRPC server.
15 | reflection.Register(s)
16 |
17 | s.Serve(lis)
18 | ```
19 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/mesher/mesher-consumer/conf/chassis.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | cse:
3 | protocols:
4 | http:
5 | listenAddress: 127.0.0.1:30101
6 | service:
7 | registry:
8 | address: http://127.0.0.1:30100 # uri of service center
9 | scope: full #set full to be able to discover other app's service
10 | watch: false # set if you want to watch instance change event
11 | autoIPIndex: true # set to true if u want to resolve source IP to microservice
12 | handler:
13 | chain:
14 | Consumer:
15 | outgoing: router, bizkeeper-consumer, ratelimiter-consumer, loadbalance, transport
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/language/gen_common.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build ignore
6 |
7 | package language
8 |
9 | // This file contains code common to the maketables.go and the package code.
10 |
11 | // langAliasType is the type of an alias in langAliasMap.
12 | type langAliasType int8
13 |
14 | const (
15 | langDeprecated langAliasType = iota
16 | langMacro
17 | langLegacy
18 |
19 | langAliasTypeUnknown langAliasType = -1
20 | )
21 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM frolvlad/alpine-glibc:latest
2 | RUN mkdir -p /opt/mesher && \
3 | mkdir -p /etc/mesher/conf && \
4 | mkdir -p /etc/ssl/meshercert/ && \
5 | touch /etc/mesher/conf/mesher.yaml && \
6 | mkdir -p /etc/chassis-go/schemas/
7 | # To upload schemas using env enable SCHEMA_ROOT as environment variable using dockerfile or pass while running container
8 | #ENV SCHEMA_ROOT=/etc/chassis-go/schemas umcomment in future
9 | ADD mesher.tar.gz /opt/mesher
10 | ADD start.sh /opt/mesher
11 | ENV CHASSIS_HOME=/opt/mesher/
12 | WORKDIR $CHASSIS_HOME
13 | ENTRYPOINT ["sh", "/opt/mesher/start.sh"]
14 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-provider/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM frolvlad/alpine-glibc:latest
2 | RUN mkdir -p /opt/mesher && \
3 | mkdir -p /etc/mesher/conf && \
4 | mkdir -p /etc/ssl/meshercert/ && \
5 | touch /etc/mesher/conf/mesher.yaml && \
6 | mkdir -p /etc/chassis-go/schemas/
7 | # To upload schemas using env enable SCHEMA_ROOT as environment variable using dockerfile or pass while running container
8 | #ENV SCHEMA_ROOT=/etc/chassis-go/schemas umcomment in future
9 | ADD mesher.tar.gz /opt/mesher
10 | ADD start.sh /opt/mesher
11 | ENV CHASSIS_HOME=/opt/mesher/
12 | WORKDIR $CHASSIS_HOME
13 | ENTRYPOINT ["sh", "/opt/mesher/start.sh"]
14 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (cmsg *Cmsghdr) SetLen(length int) {
22 | cmsg.Len = uint32(length)
23 | }
24 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/trace/trace_go17.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.7
6 |
7 | package trace
8 |
9 | import "context"
10 |
11 | // NewContext returns a copy of the parent context
12 | // and associates it with a Trace.
13 | func NewContext(ctx context.Context, tr Trace) context.Context {
14 | return context.WithValue(ctx, contextKey, tr)
15 | }
16 |
17 | // FromContext returns the Trace bound to the context, if any.
18 | func FromContext(ctx context.Context) (tr Trace, ok bool) {
19 | tr, ok = ctx.Value(contextKey).(Trace)
20 | return
21 | }
22 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dirent.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // ParseDirent parses up to max directory entries in buf,
12 | // appending the names to names. It returns the number of
13 | // bytes consumed from buf, the number of entries added
14 | // to names, and the new names slice.
15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
16 | return syscall.ParseDirent(buf, max, names)
17 | }
18 |
--------------------------------------------------------------------------------
/PHP-Mesher-Example/server/api.php:
--------------------------------------------------------------------------------
1 | = 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-server/src/main/java/com/mesher/endpoint/HelloWorldPublisher.java:
--------------------------------------------------------------------------------
1 | package com.mesher.endpoint;
2 |
3 | import com.mesher.ws.HelloWorldImpl;
4 | import javax.xml.ws.Endpoint;
5 |
6 | // EndPoint publisher
7 | public class HelloWorldPublisher {
8 | public static void main(String[] args){
9 |
10 | try {
11 | Endpoint.publish("http://0.0.0.0:8888/ws/hello",new HelloWorldImpl());
12 | System.out.println("run success ,listened : http://localhost:8888");
13 | System.out.println("wsdl : http://localhost:8888/ws/hello?wsdl");
14 | } catch (Exception e) {
15 | System.out.println("run failure :"+e.getLocalizedMessage());
16 | e.printStackTrace();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,race linux,race freebsd,race
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/context/go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.9
6 |
7 | package context
8 |
9 | import "context" // standard library's context, as of Go 1.7
10 |
11 | // A Context carries a deadline, a cancelation signal, and other values across
12 | // API boundaries.
13 | //
14 | // Context's methods may be called by multiple goroutines simultaneously.
15 | type Context = context.Context
16 |
17 | // A CancelFunc tells an operation to abandon its work.
18 | // A CancelFunc does not wait for the work to stop.
19 | // After the first call, subsequent calls to a CancelFunc do nothing.
20 | type CancelFunc = context.CancelFunc
21 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/go111.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.11
6 |
7 | package http2
8 |
9 | import "net/textproto"
10 |
11 | func traceHasWroteHeaderField(trace *clientTrace) bool {
12 | return trace != nil && trace.WroteHeaderField != nil
13 | }
14 |
15 | func traceWroteHeaderField(trace *clientTrace, k, v string) {
16 | if trace != nil && trace.WroteHeaderField != nil {
17 | trace.WroteHeaderField(k, []string{v})
18 | }
19 | }
20 |
21 | func traceGot1xxResponseFunc(trace *clientTrace) func(int, textproto.MIMEHeader) error {
22 | if trace != nil {
23 | return trace.Got1xxResponse
24 | }
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/not_go18.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.8
6 |
7 | package http2
8 |
9 | import (
10 | "io"
11 | "net/http"
12 | )
13 |
14 | func configureServer18(h1 *http.Server, h2 *Server) error {
15 | // No IdleTimeout to sync prior to Go 1.8.
16 | return nil
17 | }
18 |
19 | func shouldLogPanic(panicValue interface{}) bool {
20 | return panicValue != nil
21 | }
22 |
23 | func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
24 | return nil
25 | }
26 |
27 | func reqBodyIsNoBody(io.ReadCloser) bool { return false }
28 |
29 | func go18httpNoBody() io.ReadCloser { return nil } // for tests only
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/version.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2018 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | package grpc
20 |
21 | // Version is the current grpc version.
22 | const Version = "1.14.0"
23 |
--------------------------------------------------------------------------------
/pilotv2-example/client/istio-destinationrule-reader.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: rbac.authorization.k8s.io/v1
2 | kind: ClusterRole
3 | metadata:
4 | name: istio-destinationrule-reader
5 | rules:
6 | - apiGroups:
7 | - "networking.istio.io"
8 | resources:
9 | # - virtualservices
10 | - destinationrules
11 | verbs:
12 | # - create
13 | # - delete
14 | - get
15 | - list
16 | # - patch
17 | # - update
18 | # - watch
19 | ---
20 | apiVersion: rbac.authorization.k8s.io/v1
21 | kind: ClusterRoleBinding
22 | metadata:
23 | name: system:serviceaccount:default:istio-destinationrule-reader
24 | roleRef:
25 | apiGroup: rbac.authorization.k8s.io
26 | kind: ClusterRole
27 | name: istio-destinationrule-reader
28 | subjects:
29 | - apiGroup: rbac.authorization.k8s.io
30 | kind: User
31 | name: system:serviceaccount:default:default
32 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/src/com/mesher/myproxy/myProxySelector.java:
--------------------------------------------------------------------------------
1 | package com.mesher.myproxy;
2 |
3 | import java.io.IOException;
4 | import java.net.*;
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | public class myProxySelector extends ProxySelector {
9 | @Override
10 | public List select(URI uri) {
11 | List list = new ArrayList();
12 | // 设置需要进行代理的地址,此处为mesher的host和port
13 | String address = "127.0.0.1";
14 | int port = 30101;
15 | InetSocketAddress socketAddress = new InetSocketAddress(address,port);
16 | Proxy proxy = new Proxy(Proxy.Type.HTTP,socketAddress);
17 | list.add(proxy);
18 | return list;
19 | }
20 |
21 | @Override
22 | public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | )
27 |
28 | // Socketoption Level
29 | const (
30 | SOL_BLUETOOTH = 0x112
31 | SOL_HCI = 0x0
32 | SOL_L2CAP = 0x6
33 | SOL_RFCOMM = 0x12
34 | SOL_SCO = 0x11
35 | )
36 |
--------------------------------------------------------------------------------
/Go-Mesher-Example/grafana/import.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | sleep 3
4 | # Import data sources
5 | for file in *-datasource.json; do
6 | if [ -e "$file" ]; then
7 | echo "importing $file" &&
8 | curl --silent --fail --show-error \
9 | --request POST http://admin:admin@MyGrafana:3000/api/datasources \
10 | --header "Content-Type: application/json" \
11 | --header "Accept: application/json" \
12 | --data-binary "@$file";
13 | echo "";
14 | fi
15 | done;
16 |
17 | # Import dashboards
18 | for file in *-dashboard.json; do
19 | if [ -e "$file" ]; then
20 | echo "importing $file" &&
21 | curl -v --request POST http://admin:admin@MyGrafana:3000/api/dashboards/import \
22 | --header "Content-Type: application/json" \
23 | --header "Accept: application/json" \
24 | --data-binary "@$file";
25 | echo "";
26 | fi
27 | done;
28 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/src/com/mesher/client/HelloWorldClient.java:
--------------------------------------------------------------------------------
1 | package com.mesher.client;
2 |
3 |
4 | import com.mesher.myproxy.myProxySelector;
5 | import com.mesher.ws.HelloWorld;
6 |
7 | import javax.xml.namespace.QName;
8 | import javax.xml.ws.Service;
9 | import java.net.ProxySelector;
10 | import java.net.URL;
11 |
12 | public class HelloWorldClient {
13 |
14 | public static String callJAXWS(String name,String mesher) throws Exception {
15 | ProxySelector.setDefault(new myProxySelector());
16 | URL url = new URL(" http://" + mesher + ":8888/ws/hello?wsdl");
17 | QName qname = new QName("http://ws.mesher.com/", "HelloWorldImplService");
18 |
19 | Service service = Service.create(url, qname);
20 | HelloWorld hello = service.getPort(HelloWorld.class);
21 |
22 | return hello.helloWorld(name);
23 |
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2015 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | /*
20 | Package grpc implements an RPC system called gRPC.
21 |
22 | See grpc.io for more information about gRPC.
23 | */
24 | package grpc // import "google.golang.org/grpc"
25 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/language/go1_1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !go1.2
6 |
7 | package language
8 |
9 | import "sort"
10 |
11 | func sortStable(s sort.Interface) {
12 | ss := stableSort{
13 | s: s,
14 | pos: make([]int, s.Len()),
15 | }
16 | for i := range ss.pos {
17 | ss.pos[i] = i
18 | }
19 | sort.Sort(&ss)
20 | }
21 |
22 | type stableSort struct {
23 | s sort.Interface
24 | pos []int
25 | }
26 |
27 | func (s *stableSort) Len() int {
28 | return len(s.pos)
29 | }
30 |
31 | func (s *stableSort) Less(i, j int) bool {
32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j]
33 | }
34 |
35 | func (s *stableSort) Swap(i, j int) {
36 | s.s.Swap(i, j)
37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i]
38 | }
39 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/naming/go18.go:
--------------------------------------------------------------------------------
1 | // +build go1.8
2 |
3 | /*
4 | *
5 | * Copyright 2017 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package naming
22 |
23 | import "net"
24 |
25 | var (
26 | lookupHost = net.DefaultResolver.LookupHost
27 | lookupSRV = net.DefaultResolver.LookupSRV
28 | )
29 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/resolver/dns/go18.go:
--------------------------------------------------------------------------------
1 | // +build go1.8
2 |
3 | /*
4 | *
5 | * Copyright 2017 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package dns
22 |
23 | import "net"
24 |
25 | var (
26 | lookupHost = net.DefaultResolver.LookupHost
27 | lookupSRV = net.DefaultResolver.LookupSRV
28 | lookupTXT = net.DefaultResolver.LookupTXT
29 | )
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for Darwin from sys/syscall.h
7 |
8 | use strict;
9 |
10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
11 | print STDERR "GOARCH or GOOS not defined in environment\n";
12 | exit 1;
13 | }
14 |
15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
16 |
17 | print <){
29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
30 | my $name = $1;
31 | my $num = $2;
32 | $name =~ y/a-z/A-Z/;
33 | print " SYS_$name = $num;"
34 | }
35 | }
36 |
37 | print <> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/ioctl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
12 | //
13 | // To change fd's window size, the req argument should be TIOCSWINSZ.
14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
15 | // TODO: if we get the chance, remove the req parameter and
16 | // hardcode TIOCSWINSZ.
17 | err := ioctlSetWinsize(fd, req, value)
18 | runtime.KeepAlive(value)
19 | return err
20 | }
21 |
22 | // IoctlSetTermios performs an ioctl on fd with a *Termios.
23 | //
24 | // The req value will usually be TCSETA or TIOCSETA.
25 | func IoctlSetTermios(fd int, req uint, value *Termios) error {
26 | // TODO: if we get the chance, remove the req parameter.
27 | err := ioctlSetTermios(fd, req, value)
28 | runtime.KeepAlive(value)
29 | return err
30 | }
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (cmsg *Cmsghdr) SetLen(length int) {
32 | cmsg.Len = uint32(length)
33 | }
34 |
35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
37 | const SYS___SYSCTL = SYS_SYSCTL
38 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: sec, Nsec: nsec}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int64(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint64(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/credentials/go19.go:
--------------------------------------------------------------------------------
1 | // +build go1.9,!appengine
2 |
3 | /*
4 | *
5 | * Copyright 2018 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package credentials
22 |
23 | import (
24 | "errors"
25 | "syscall"
26 | )
27 |
28 | // implements the syscall.Conn interface
29 | func (c tlsConn) SyscallConn() (syscall.RawConn, error) {
30 | conn, ok := c.rawConn.(syscall.Conn)
31 | if !ok {
32 | return nil, errors.New("RawConn does not implement syscall.Conn")
33 | }
34 | return conn.SyscallConn()
35 | }
36 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/naming/go17.go:
--------------------------------------------------------------------------------
1 | // +build go1.6,!go1.8
2 |
3 | /*
4 | *
5 | * Copyright 2017 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package naming
22 |
23 | import (
24 | "net"
25 |
26 | "golang.org/x/net/context"
27 | )
28 |
29 | var (
30 | lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) }
31 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) {
32 | return net.LookupSRV(service, proto, name)
33 | }
34 | )
35 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2018 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | // Package envconfig contains grpc settings configured by environment variables.
20 | package envconfig
21 |
22 | import (
23 | "os"
24 | "strings"
25 | )
26 |
27 | const (
28 | prefix = "GRPC_GO_"
29 | retryStr = prefix + "RETRY"
30 | )
31 |
32 | var (
33 | // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on".
34 | Retry = strings.EqualFold(os.Getenv(retryStr), "on")
35 | )
36 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg))
18 | var err error
19 | if errno != 0 {
20 | err = errno
21 | }
22 | return int(valptr), err
23 | }
24 |
25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
28 | if errno == 0 {
29 | return nil
30 | }
31 | return errno
32 | }
33 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | package unix
9 |
10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
13 |
14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
15 |
16 | func setTimespec(sec, nsec int64) Timespec {
17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
18 | }
19 |
20 | func setTimeval(sec, usec int64) Timeval {
21 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
22 | }
23 |
24 | func (iov *Iovec) SetLen(length int) {
25 | iov.Len = uint32(length)
26 | }
27 |
28 | func (msghdr *Msghdr) SetControllen(length int) {
29 | msghdr.Controllen = uint32(length)
30 | }
31 |
32 | func (cmsg *Cmsghdr) SetLen(length int) {
33 | cmsg.Len = uint32(length)
34 | }
35 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 | services:
3 | ServiceCenter:
4 | image: servicecomb/service-center:1.0.0
5 | ports:
6 | - 30100:30100
7 | MesherProvider:
8 | image: gomesh/mesher
9 | environment:
10 | - CSE_REGISTRY_ADDR=http://ServiceCenter:30100 #https://cse.cn-north-1.myhwclouds.com:443
11 | - SERVICE_NAME=Server
12 | - VERSION=0.0.1
13 | - APP_ID=default
14 | MesherConsumer:
15 | image: gomesh/mesher
16 | environment:
17 | - CSE_REGISTRY_ADDR=http://ServiceCenter:30100 #https://cse.cn-north-1.myhwclouds.com:443
18 | - SERVICE_NAME=Client
19 | - VERSION=0.0.1
20 | - APP_ID=default
21 | links:
22 | - ServiceCenter
23 | ports:
24 | - 9000:3000
25 | Server:
26 | build:
27 | context: ./greeter_server
28 | dockerfile: Dockerfile
29 | image: server-grpc
30 | network_mode: "service:MesherProvider"
31 | Client:
32 | build:
33 | context: ./greeter_client
34 | dockerfile: Dockerfile
35 | image: client-grpc
36 | environment:
37 | - http_proxy=http://127.0.0.1:40101
38 | network_mode: "service:MesherConsumer"
39 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/pilotv2-example/client/build/distribute-image.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | imagename=$1
3 | if [ "$imagename" == "" ]; then
4 | echo "need an image name"
5 | exit 1
6 | fi
7 |
8 | imagefilename=$(echo $imagename | sed 's/\//_/g')
9 |
10 | # nodeIPs=$(kubectl get nodes -o wide | grep -v 'NAME.*STATUS' | awk '{print $1}')
11 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="ExternalIP")].address}')
12 | if [ "$nodeIPs" == "" ]; then
13 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="InternalIP")].address}')
14 | fi
15 | if [ "$nodeIPs" == "" ]; then
16 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="Hostname")].address}')
17 | fi
18 |
19 | if [ "$nodeIPs" == "" ]; then
20 | echo "Failed to get nodes' IP"
21 | exit 1
22 | fi
23 |
24 | echo saving to $imagefilename.tar
25 | docker save $imagename > /tmp/$imagefilename.tar
26 |
27 | for nodeip in ${nodeIPs[@]}
28 | do
29 | echo distributing $imagename "to" $nodeip
30 | scp /tmp/$imagefilename.tar root@$nodeip:/root/
31 | ssh root@$nodeip "docker load < /root/$imagefilename.tar"
32 | ssh root@$nodeip "rm /root/$imagefilename.tar"
33 | done
34 |
35 | rm /tmp/$imagefilename.tar
36 |
--------------------------------------------------------------------------------
/pilotv2-example/server/build/distribute-image.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | imagename=$1
3 | if [ "$imagename" == "" ]; then
4 | echo "need an image name"
5 | exit 1
6 | fi
7 |
8 | imagefilename=$(echo $imagename | sed 's/\//_/g')
9 |
10 | # nodeIPs=$(kubectl get nodes -o wide | grep -v 'NAME.*STATUS' | awk '{print $1}')
11 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="ExternalIP")].address}')
12 | if [ "$nodeIPs" == "" ]; then
13 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="InternalIP")].address}')
14 | fi
15 | if [ "$nodeIPs" == "" ]; then
16 | nodeIPs=$(kubectl get nodes -o jsonpath='{$.items[*].status.addresses[?(@.type=="Hostname")].address}')
17 | fi
18 |
19 | if [ "$nodeIPs" == "" ]; then
20 | echo "Failed to get nodes' IP"
21 | exit 1
22 | fi
23 |
24 | echo saving to $imagefilename.tar
25 | docker save $imagename > /tmp/$imagefilename.tar
26 |
27 | for nodeip in ${nodeIPs[@]}
28 | do
29 | echo distributing $imagename "to" $nodeip
30 | scp /tmp/$imagefilename.tar root@$nodeip:/root/
31 | ssh root@$nodeip "docker load < /root/$imagefilename.tar"
32 | ssh root@$nodeip "rm /root/$imagefilename.tar"
33 | done
34 |
35 | rm /tmp/$imagefilename.tar
36 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/client/client.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "net/http"
7 | "os"
8 | )
9 |
10 | var myClient *http.Client
11 |
12 | func init() {
13 | defaultRoundTripper := http.DefaultTransport
14 | defaultTransportPointer, ok := defaultRoundTripper.(*http.Transport)
15 | if !ok {
16 | panic(fmt.Sprintf("defaultRoundTripper not an *http.Transport"))
17 | }
18 | defaultTransport := *defaultTransportPointer // dereference it to get a copy of the struct that the pointer points to
19 | defaultTransport.MaxIdleConns = 100
20 | defaultTransport.MaxIdleConnsPerHost = 100
21 |
22 | myClient = &http.Client{Transport: &defaultTransport}
23 |
24 | }
25 | func main() {
26 | http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
27 | resp, err := myClient.Get(os.Getenv("TARGET"))
28 | log.Println(os.Getenv("TARGET"))
29 | if err != nil {
30 | w.WriteHeader(500)
31 | w.Write([]byte(err.Error()))
32 | return
33 | }
34 | if resp == nil {
35 | w.WriteHeader(500)
36 | return
37 | }
38 |
39 | b := make([]byte, 0)
40 | _, _ = resp.Body.Read(b)
41 | resp.Body.Close()
42 | w.Write(b)
43 |
44 | })
45 | http.ListenAndServe(":9000", nil)
46 | }
47 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/internal/channelz/util_linux_go19.go:
--------------------------------------------------------------------------------
1 | // +build linux,go1.9,!appengine
2 |
3 | /*
4 | *
5 | * Copyright 2018 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package channelz
22 |
23 | import (
24 | "syscall"
25 | )
26 |
27 | // GetSocketOption gets the socket option info of the conn.
28 | func GetSocketOption(socket interface{}) *SocketOptionData {
29 | c, ok := socket.(syscall.Conn)
30 | if !ok {
31 | return nil
32 | }
33 | data := &SocketOptionData{}
34 | if rawConn, err := c.SyscallConn(); err == nil {
35 | rawConn.Control(data.Getsockopt)
36 | return data
37 | }
38 | return nil
39 | }
40 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/resolver/dns/go17.go:
--------------------------------------------------------------------------------
1 | // +build go1.6, !go1.8
2 |
3 | /*
4 | *
5 | * Copyright 2017 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package dns
22 |
23 | import (
24 | "net"
25 |
26 | "golang.org/x/net/context"
27 | )
28 |
29 | var (
30 | lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) }
31 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) {
32 | return net.LookupSRV(service, proto, name)
33 | }
34 | lookupTXT = func(ctx context.Context, name string) ([]string, error) { return net.LookupTXT(name) }
35 | )
36 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/README.md:
--------------------------------------------------------------------------------
1 | # java-ws-mesher-example
2 |
3 | - This example illustrates the mesher integration with java webservices
4 |
5 | 1、Server
6 |
7 | server only use java ws .you can run the server in endpoint pkg.
8 |
9 | 1.1 Launch server
10 | ```sh
11 | cd mesher-jax-ws-server/src/main/java
12 | ./launch.sh
13 | ```
14 |
15 | 1.2 Test server
16 |
17 | you can use `curl` to test server running or down
18 | ```sh
19 | curl http://localhost:8888/ws/hello?wsdl
20 | ```
21 | if you access `http://localhost:8888/ws/hello?wsdl` success,it is illustrates sever is running
22 |
23 | 2、Client
24 |
25 | client is web project with servlet ,Use tomcat to start client .
26 |
27 | 2.1 launch client
28 |
29 | Bale project into a war ball.Then put the client war pkg in the webapps directory
30 | under tomcat . use `start.bat` or `start.sh` to start tomcat
31 | when client started you can access url `http://localhost:8080` will reply `Hello world `.
32 |
33 |
34 | Now server and client is running ,access `/helloJAX` with two query params .
35 |
36 | e.g.
37 | ```sh
38 | curl -G -d "name=jax-ws-mesher&server=mesher" http://localhost:8080/helloJAX
39 | ```
40 | if access success will reply
41 | ```sh
42 | jxs hello world =>Hello World mesher -> JAX-WS :jax-ws-mesher
43 | ```
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/sockcmsg_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Socket control messages
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // UnixCredentials encodes credentials into a socket control message
12 | // for sending to another process. This can be used for
13 | // authentication.
14 | func UnixCredentials(ucred *Ucred) []byte {
15 | b := make([]byte, CmsgSpace(SizeofUcred))
16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
17 | h.Level = SOL_SOCKET
18 | h.Type = SCM_CREDENTIALS
19 | h.SetLen(CmsgLen(SizeofUcred))
20 | *((*Ucred)(cmsgData(h))) = *ucred
21 | return b
22 | }
23 |
24 | // ParseUnixCredentials decodes a socket control message that contains
25 | // credentials in a Ucred structure. To receive such a message, the
26 | // SO_PASSCRED option must be enabled on the socket.
27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
28 | if m.Header.Level != SOL_SOCKET {
29 | return nil, EINVAL
30 | }
31 | if m.Header.Type != SCM_CREDENTIALS {
32 | return nil, EINVAL
33 | }
34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
35 | return &ucred, nil
36 | }
37 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/gccgo_c.c:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo
6 | // +build !aix
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #define _STRINGIFY2_(x) #x
13 | #define _STRINGIFY_(x) _STRINGIFY2_(x)
14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
15 |
16 | // Call syscall from C code because the gccgo support for calling from
17 | // Go to C does not support varargs functions.
18 |
19 | struct ret {
20 | uintptr_t r;
21 | uintptr_t err;
22 | };
23 |
24 | struct ret
25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
26 | {
27 | struct ret r;
28 |
29 | errno = 0;
30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
31 | r.err = errno;
32 | return r;
33 | }
34 |
35 | uintptr_t
36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
37 | {
38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
39 | }
40 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/Makefile:
--------------------------------------------------------------------------------
1 | all: vet test testrace
2 |
3 | deps:
4 | go get -d -v google.golang.org/grpc/...
5 |
6 | updatedeps:
7 | go get -d -v -u -f google.golang.org/grpc/...
8 |
9 | testdeps:
10 | go get -d -v -t google.golang.org/grpc/...
11 |
12 | testgaedeps:
13 | goapp get -d -v -t -tags 'appengine appenginevm' google.golang.org/grpc/...
14 |
15 | updatetestdeps:
16 | go get -d -v -t -u -f google.golang.org/grpc/...
17 |
18 | build: deps
19 | go build google.golang.org/grpc/...
20 |
21 | proto:
22 | @ if ! which protoc > /dev/null; then \
23 | echo "error: protoc not installed" >&2; \
24 | exit 1; \
25 | fi
26 | go generate google.golang.org/grpc/...
27 |
28 | vet:
29 | ./vet.sh
30 |
31 | test: testdeps
32 | go test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
33 |
34 | testrace: testdeps
35 | go test -race -cpu 1,4 -timeout 7m google.golang.org/grpc/...
36 |
37 | testappengine: testgaedeps
38 | goapp test -cpu 1,4 -timeout 5m google.golang.org/grpc/...
39 |
40 | clean:
41 | go clean -i google.golang.org/grpc/...
42 |
43 | .PHONY: \
44 | all \
45 | deps \
46 | updatedeps \
47 | testdeps \
48 | testgaedeps \
49 | updatetestdeps \
50 | build \
51 | proto \
52 | vet \
53 | test \
54 | testrace \
55 | clean
56 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/helloworld/helloworld.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2015 gRPC authors.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | option java_multiple_files = true;
18 | option java_package = "io.grpc.examples.helloworld";
19 | option java_outer_classname = "HelloWorldProto";
20 |
21 | package helloworld;
22 |
23 | // The greeting service definition.
24 | service Greeter {
25 | // Sends a greeting
26 | rpc SayHello (HelloRequest) returns (HelloReply) {}
27 | }
28 |
29 | // The request message containing the user's name.
30 | message HelloRequest {
31 | string name = 1;
32 | }
33 |
34 | // The response message containing the greetings
35 | message HelloReply {
36 | string message = 1;
37 | }
38 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for DragonFly from master list
7 | # (for example, /usr/src/sys/kern/syscalls.master).
8 |
9 | use strict;
10 |
11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
12 | print STDERR "GOARCH or GOOS not defined in environment\n";
13 | exit 1;
14 | }
15 |
16 | my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
17 |
18 | print <){
30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $3;
33 | my $name = $4;
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print <){
30 | if(/^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$/){
31 | my $num = $1;
32 | my $proto = $2;
33 | my $name = "SYS_$3";
34 | $name =~ y/a-z/A-Z/;
35 |
36 | # There are multiple entries for enosys and nosys, so comment them out.
37 | if($name =~ /^SYS_E?NOSYS$/){
38 | $name = "// $name";
39 | }
40 | if($name eq 'SYS_SYS_EXIT'){
41 | $name = 'SYS_EXIT';
42 | }
43 |
44 | print " $name = $num; // $proto\n";
45 | }
46 | }
47 |
48 | print < f.available() {
33 | panic("internal error: took too much")
34 | }
35 | f.n -= n
36 | if f.conn != nil {
37 | f.conn.n -= n
38 | }
39 | }
40 |
41 | // add adds n bytes (positive or negative) to the flow control window.
42 | // It returns false if the sum would exceed 2^31-1.
43 | func (f *flow) add(n int32) bool {
44 | sum := f.n + n
45 | if (sum > n) == (f.n > 0) {
46 | f.n = sum
47 | return true
48 | }
49 | return false
50 | }
51 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/backoff.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2017 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | // See internal/backoff package for the backoff implementation. This file is
20 | // kept for the exported types and API backward compatility.
21 |
22 | package grpc
23 |
24 | import (
25 | "time"
26 | )
27 |
28 | // DefaultBackoffConfig uses values specified for backoff in
29 | // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
30 | var DefaultBackoffConfig = BackoffConfig{
31 | MaxDelay: 120 * time.Second,
32 | }
33 |
34 | // BackoffConfig defines the parameters for the default gRPC backoff strategy.
35 | type BackoffConfig struct {
36 | // MaxDelay is the upper bound of backoff delay.
37 | MaxDelay time.Duration
38 | }
39 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
21 | BL runtime·entersyscall(SB)
22 | MOVD a1+8(FP), R0
23 | MOVD a2+16(FP), R1
24 | MOVD a3+24(FP), R2
25 | MOVD $0, R3
26 | MOVD $0, R4
27 | MOVD $0, R5
28 | MOVD trap+0(FP), R8 // syscall entry
29 | SVC
30 | MOVD R0, r1+32(FP) // r1
31 | MOVD R1, r2+40(FP) // r2
32 | BL runtime·exitsyscall(SB)
33 | RET
34 |
35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
36 | B syscall·RawSyscall(SB)
37 |
38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
39 | B syscall·RawSyscall6(SB)
40 |
41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
42 | MOVD a1+8(FP), R0
43 | MOVD a2+16(FP), R1
44 | MOVD a3+24(FP), R2
45 | MOVD $0, R3
46 | MOVD $0, R4
47 | MOVD $0, R5
48 | MOVD trap+0(FP), R8 // syscall entry
49 | SVC
50 | MOVD R0, r1+32(FP)
51 | MOVD R1, r2+40(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/internal/colltab/weighter.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package colltab // import "golang.org/x/text/internal/colltab"
6 |
7 | // A Weighter can be used as a source for Collator and Searcher.
8 | type Weighter interface {
9 | // Start finds the start of the segment that includes position p.
10 | Start(p int, b []byte) int
11 |
12 | // StartString finds the start of the segment that includes position p.
13 | StartString(p int, s string) int
14 |
15 | // AppendNext appends Elems to buf corresponding to the longest match
16 | // of a single character or contraction from the start of s.
17 | // It returns the new buf and the number of bytes consumed.
18 | AppendNext(buf []Elem, s []byte) (ce []Elem, n int)
19 |
20 | // AppendNextString appends Elems to buf corresponding to the longest match
21 | // of a single character or contraction from the start of s.
22 | // It returns the new buf and the number of bytes consumed.
23 | AppendNextString(buf []Elem, s string) (ce []Elem, n int)
24 |
25 | // Domain returns a slice of all single characters and contractions for which
26 | // collation elements are defined in this table.
27 | Domain() []string
28 |
29 | // Top returns the highest variable primary value.
30 | Top() uint32
31 | }
32 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/status/go16.go:
--------------------------------------------------------------------------------
1 | // +build go1.6,!go1.7
2 |
3 | /*
4 | *
5 | * Copyright 2018 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package status
22 |
23 | import (
24 | "golang.org/x/net/context"
25 | "google.golang.org/grpc/codes"
26 | )
27 |
28 | // FromContextError converts a context error into a Status. It returns a
29 | // Status with codes.OK if err is nil, or a Status with codes.Unknown if err is
30 | // non-nil and not a context error.
31 | func FromContextError(err error) *Status {
32 | switch err {
33 | case nil:
34 | return New(codes.OK, "")
35 | case context.DeadlineExceeded:
36 | return New(codes.DeadlineExceeded, err.Error())
37 | case context.Canceled:
38 | return New(codes.Canceled, err.Error())
39 | default:
40 | return New(codes.Unknown, err.Error())
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/java-ws-Mesher-Example/mesher-jax-ws-client/src/iServlet/helloWorldServlet.java:
--------------------------------------------------------------------------------
1 | package iServlet;
2 |
3 | import com.mesher.client.HelloWorldClient;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.annotation.WebServlet;
7 | import javax.servlet.http.HttpServlet;
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 | import java.io.IOException;
11 | import java.io.PrintWriter;
12 |
13 | @WebServlet(name = "helloWorldServlet", urlPatterns = {"/helloJAX"})
14 | public class helloWorldServlet extends HttpServlet {
15 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
16 | PrintWriter out = response.getWriter();
17 | String name= request.getParameter("name");
18 | String mesherName = request.getParameter("server");
19 | String result = "";
20 | try {
21 | result= HelloWorldClient.callJAXWS(name,mesherName);
22 | } catch (Exception e) {
23 | out.println("call jax error"+e.getLocalizedMessage());
24 | e.printStackTrace();
25 | }
26 | response.setContentType("text/html");
27 | out.println("jxs hello world =>"+result);
28 |
29 | }
30 |
31 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
32 | doPost(request, response);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R2
27 | MOVD a2+16(FP), R3
28 | MOVD a3+24(FP), R4
29 | MOVD $0, R5
30 | MOVD $0, R6
31 | MOVD $0, R7
32 | MOVD trap+0(FP), R1 // syscall entry
33 | SYSCALL
34 | MOVD R2, r1+32(FP)
35 | MOVD R3, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R2
47 | MOVD a2+16(FP), R3
48 | MOVD a3+24(FP), R4
49 | MOVD $0, R5
50 | MOVD $0, R6
51 | MOVD $0, R7
52 | MOVD trap+0(FP), R1 // syscall entry
53 | SYSCALL
54 | MOVD R2, r1+32(FP)
55 | MOVD R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/zptracearm_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips mipsle
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-28
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
28 | JAL runtime·entersyscall(SB)
29 | MOVW a1+4(FP), R4
30 | MOVW a2+8(FP), R5
31 | MOVW a3+12(FP), R6
32 | MOVW R0, R7
33 | MOVW trap+0(FP), R2 // syscall entry
34 | SYSCALL
35 | MOVW R2, r1+16(FP) // r1
36 | MOVW R3, r2+20(FP) // r2
37 | JAL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVW a1+4(FP), R4
48 | MOVW a2+8(FP), R5
49 | MOVW a3+12(FP), R6
50 | MOVW trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVW R2, r1+16(FP)
53 | MOVW R3, r2+20(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/hybrid/provider/src/main/java/com/example/demo/HelloConsumer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package com.example.demo;
19 |
20 | import org.apache.servicecomb.provider.springmvc.reference.RestTemplateBuilder;
21 | import org.springframework.web.client.RestTemplate;
22 |
23 | public class HelloConsumer {
24 | private final RestTemplate restTemplate = RestTemplateBuilder.create();
25 |
26 | public void invokeHello() {
27 | //service url is : cse://serviceName/operation
28 | String serviceName = "HelloServiceComb";
29 | restTemplate.getForObject("cse://" + serviceName + "/hello", String.class);
30 | }
31 | }
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R3
27 | MOVD a2+16(FP), R4
28 | MOVD a3+24(FP), R5
29 | MOVD R0, R6
30 | MOVD R0, R7
31 | MOVD R0, R8
32 | MOVD trap+0(FP), R9 // syscall entry
33 | SYSCALL R9
34 | MOVD R3, r1+32(FP)
35 | MOVD R4, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R3
47 | MOVD a2+16(FP), R4
48 | MOVD a3+24(FP), R5
49 | MOVD R0, R6
50 | MOVD R0, R7
51 | MOVD R0, R8
52 | MOVD trap+0(FP), R9 // syscall entry
53 | SYSCALL R9
54 | MOVD R3, r1+32(FP)
55 | MOVD R4, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/server/server-mesher.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: server-mesher
5 | labels:
6 | app: perf
7 | version: 0.0.1
8 | spec:
9 | containers:
10 | - name: server
11 | image: xiaoliang/server-go
12 | ports:
13 | - containerPort: 9999
14 | resources:
15 | limits:
16 | cpu: "1"
17 | - name: mesher
18 | image: xiaoliang/mesher
19 | args:
20 | - --service-ports
21 | - rest:9999
22 | env:
23 | - name: SERVICE_NAME
24 | valueFrom:
25 | fieldRef:
26 | fieldPath: metadata.name
27 | - name: CSE_REGISTRY_ADDR
28 | # value: http://service-center.default:30100
29 | value: http://192.168.1.94:30100
30 | - name: SERVICE_PORTS
31 | value: rest:9999
32 | ports:
33 | - containerPort: 30101
34 | - containerPort: 30102
35 | - containerPort: 6060
36 | resources:
37 | limits:
38 | cpu: "2"
39 | ---
40 | apiVersion: v1
41 | kind: Service
42 | apiVersion: v1
43 | metadata:
44 | name: service-mesher
45 | spec:
46 | selector:
47 | app: perf
48 | ports:
49 | - protocol: TCP
50 | name: mesher
51 | port: 30105
52 | nodePort: 30105
53 | targetPort: 30101
54 | - protocol: TCP
55 | name: server
56 | port: 30104
57 | nodePort: 30104
58 | targetPort: 9999
59 | type: NodePort
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | JAL runtime·entersyscall(SB)
26 | MOVV a1+8(FP), R4
27 | MOVV a2+16(FP), R5
28 | MOVV a3+24(FP), R6
29 | MOVV R0, R7
30 | MOVV R0, R8
31 | MOVV R0, R9
32 | MOVV trap+0(FP), R2 // syscall entry
33 | SYSCALL
34 | MOVV R2, r1+32(FP)
35 | MOVV R3, r2+40(FP)
36 | JAL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | JMP syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | JMP syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVV a1+8(FP), R4
47 | MOVV a2+16(FP), R5
48 | MOVV a3+24(FP), R6
49 | MOVV R0, R7
50 | MOVV R0, R8
51 | MOVV R0, R9
52 | MOVV trap+0(FP), R2 // syscall entry
53 | SYSCALL
54 | MOVV R2, r1+32(FP)
55 | MOVV R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go:
--------------------------------------------------------------------------------
1 | // +build !linux appengine !go1.7
2 |
3 | /*
4 | *
5 | * Copyright 2018 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package channelz
22 |
23 | import "google.golang.org/grpc/grpclog"
24 |
25 | func init() {
26 | grpclog.Infof("Channelz: socket options are not supported on non-linux os and appengine.")
27 | }
28 |
29 | // SocketOptionData defines the struct to hold socket option data, and related
30 | // getter function to obtain info from fd.
31 | // Windows OS doesn't support Socket Option
32 | type SocketOptionData struct {
33 | }
34 |
35 | // Getsockopt defines the function to get socket options requested by channelz.
36 | // It is to be passed to syscall.RawConn.Control().
37 | // Windows OS doesn't support Socket Option
38 | func (s *SocketOptionData) Getsockopt(fd uintptr) {}
39 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/status/go17.go:
--------------------------------------------------------------------------------
1 | // +build go1.7
2 |
3 | /*
4 | *
5 | * Copyright 2018 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package status
22 |
23 | import (
24 | "context"
25 |
26 | netctx "golang.org/x/net/context"
27 | "google.golang.org/grpc/codes"
28 | )
29 |
30 | // FromContextError converts a context error into a Status. It returns a
31 | // Status with codes.OK if err is nil, or a Status with codes.Unknown if err is
32 | // non-nil and not a context error.
33 | func FromContextError(err error) *Status {
34 | switch err {
35 | case nil:
36 | return New(codes.OK, "")
37 | case context.DeadlineExceeded, netctx.DeadlineExceeded:
38 | return New(codes.DeadlineExceeded, err.Error())
39 | case context.Canceled, netctx.Canceled:
40 | return New(codes.Canceled, err.Error())
41 | default:
42 | return New(codes.Unknown, err.Error())
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by the Linux kernel and glibc.
10 | //
11 | // The information below is extracted and adapted from bits/sysmacros.h in the
12 | // glibc sources:
13 | //
14 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
15 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
16 | // number and m is a hex digit of the minor number. This is backward compatible
17 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
18 | // backward compatible with the Linux kernel, which for some architectures uses
19 | // 32-bit dev_t, encoded as mmmM MMmm.
20 |
21 | package unix
22 |
23 | // Major returns the major component of a Linux device number.
24 | func Major(dev uint64) uint32 {
25 | return uint32((dev >> 16) & 0xffff)
26 | }
27 |
28 | // Minor returns the minor component of a Linux device number.
29 | func Minor(dev uint64) uint32 {
30 | return uint32(dev & 0xffff)
31 | }
32 |
33 | // Mkdev returns a Linux device number generated from the given major and minor
34 | // components.
35 | func Mkdev(major, minor uint32) uint64 {
36 | return uint64(((major) << 16) | (minor))
37 | }
38 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (cmsg *Cmsghdr) SetLen(length int) {
37 | cmsg.Len = uint32(length)
38 | }
39 |
40 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
41 | var writtenOut uint64 = 0
42 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
43 |
44 | written = int(writtenOut)
45 |
46 | if e1 != 0 {
47 | err = e1
48 | }
49 | return
50 | }
51 |
52 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/text/unicode/norm/trie.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm
6 |
7 | type valueRange struct {
8 | value uint16 // header: value:stride
9 | lo, hi byte // header: lo:n
10 | }
11 |
12 | type sparseBlocks struct {
13 | values []valueRange
14 | offset []uint16
15 | }
16 |
17 | var nfcSparse = sparseBlocks{
18 | values: nfcSparseValues[:],
19 | offset: nfcSparseOffset[:],
20 | }
21 |
22 | var nfkcSparse = sparseBlocks{
23 | values: nfkcSparseValues[:],
24 | offset: nfkcSparseOffset[:],
25 | }
26 |
27 | var (
28 | nfcData = newNfcTrie(0)
29 | nfkcData = newNfkcTrie(0)
30 | )
31 |
32 | // lookupValue determines the type of block n and looks up the value for b.
33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
34 | // is a list of ranges with an accompanying value. Given a matching range r,
35 | // the value for b is by r.value + (b - r.lo) * stride.
36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
37 | offset := t.offset[n]
38 | header := t.values[offset]
39 | lo := offset + 1
40 | hi := lo + uint16(header.lo)
41 | for lo < hi {
42 | m := lo + (hi-lo)/2
43 | r := t.values[m]
44 | if r.lo <= b && b <= r.hi {
45 | return r.value + uint16(b-r.lo)*header.value
46 | }
47 | if b < r.lo {
48 | hi = m
49 | } else {
50 | lo = m + 1
51 | }
52 | }
53 | return 0
54 | }
55 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 | #
6 | # Generate system call table for OpenBSD from master list
7 | # (for example, /usr/src/sys/kern/syscalls.master).
8 |
9 | use strict;
10 |
11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
12 | print STDERR "GOARCH or GOOS not defined in environment\n";
13 | exit 1;
14 | }
15 |
16 | my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
17 |
18 | print <){
31 | if($line =~ /^(.*)\\$/) {
32 | # Handle continuation
33 | $line = $1;
34 | $_ =~ s/^\s+//;
35 | $line .= $_;
36 | } else {
37 | # New line
38 | $line = $_;
39 | }
40 | next if $line =~ /\\$/;
41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
42 | my $num = $1;
43 | my $proto = $6;
44 | my $compat = $8;
45 | my $name = "$7_$9";
46 |
47 | $name = "$7_$11" if $11 ne '';
48 | $name =~ y/a-z/A-Z/;
49 |
50 | if($compat eq '' || $compat eq '13' || $compat eq '30' || $compat eq '50') {
51 | print " $name = $num; // $proto\n";
52 | }
53 | }
54 | }
55 |
56 | print <> 32)
26 | }
27 |
28 | // Minor returns the minor component of a Linux device number.
29 | func Minor(dev uint64) uint32 {
30 | return uint32((dev & 0x00000000ffffffff) >> 0)
31 | }
32 |
33 | // Mkdev returns a Linux device number generated from the given major and minor
34 | // components.
35 | func Mkdev(major, minor uint32) uint64 {
36 | var DEVNO64 uint64
37 | DEVNO64 = 0x8000000000000000
38 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
39 | }
40 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2018 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | // Package grpcrand implements math/rand functions in a concurrent-safe way
20 | // with a global random source, independent of math/rand's global source.
21 | package grpcrand
22 |
23 | import (
24 | "math/rand"
25 | "sync"
26 | "time"
27 | )
28 |
29 | var (
30 | r = rand.New(rand.NewSource(time.Now().UnixNano()))
31 | mu sync.Mutex
32 | )
33 |
34 | // Int63n implements rand.Int63n on the grpcrand global source.
35 | func Int63n(n int64) int64 {
36 | mu.Lock()
37 | res := r.Int63n(n)
38 | mu.Unlock()
39 | return res
40 | }
41 |
42 | // Intn implements rand.Intn on the grpcrand global source.
43 | func Intn(n int) int {
44 | mu.Lock()
45 | res := r.Intn(n)
46 | mu.Unlock()
47 | return res
48 | }
49 |
50 | // Float64 implements rand.Float64 on the grpcrand global source.
51 | func Float64() float64 {
52 | mu.Lock()
53 | res := r.Float64()
54 | mu.Unlock()
55 | return res
56 | }
57 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/zptracemips_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mips, mips64). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mips mips64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMips is the registers used by mips binaries.
11 | type PtraceRegsMips struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMips fetches the registers used by mips binaries.
22 | func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMips sets the registers used by mips binaries.
27 | func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64 is the registers used by mips64 binaries.
32 | type PtraceRegsMips64 struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64 fetches the registers used by mips64 binaries.
43 | func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64 sets the registers used by mips64 binaries.
48 | func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http/httpguts/guts.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package httpguts provides functions implementing various details
6 | // of the HTTP specification.
7 | //
8 | // This package is shared by the standard library (which vendors it)
9 | // and x/net/http2. It comes with no API stability promise.
10 | package httpguts
11 |
12 | import (
13 | "net/textproto"
14 | "strings"
15 | )
16 |
17 | // ValidTrailerHeader reports whether name is a valid header field name to appear
18 | // in trailers.
19 | // See RFC 7230, Section 4.1.2
20 | func ValidTrailerHeader(name string) bool {
21 | name = textproto.CanonicalMIMEHeaderKey(name)
22 | if strings.HasPrefix(name, "If-") || badTrailer[name] {
23 | return false
24 | }
25 | return true
26 | }
27 |
28 | var badTrailer = map[string]bool{
29 | "Authorization": true,
30 | "Cache-Control": true,
31 | "Connection": true,
32 | "Content-Encoding": true,
33 | "Content-Length": true,
34 | "Content-Range": true,
35 | "Content-Type": true,
36 | "Expect": true,
37 | "Host": true,
38 | "Keep-Alive": true,
39 | "Max-Forwards": true,
40 | "Pragma": true,
41 | "Proxy-Authenticate": true,
42 | "Proxy-Authorization": true,
43 | "Proxy-Connection": true,
44 | "Range": true,
45 | "Realm": true,
46 | "Te": true,
47 | "Trailer": true,
48 | "Transfer-Encoding": true,
49 | "Www-Authenticate": true,
50 | }
51 |
--------------------------------------------------------------------------------
/pilotv2-example/mesher/mesher-consumer/conf/fault.yaml:
--------------------------------------------------------------------------------
1 | #cse:
2 | # governance:
3 | # Consumer:
4 | # _global: #最低优先级配置
5 | # policy: #治理策略 包括fault,loadbalance,circuit breaker等等,目前只是新的fault加入,旧的治理可考虑慢慢增加支持
6 | # fault: #
7 | # protocols: # 向协议模块注入错误,考虑未来扩展多任意组件注入错误,所以这么设计
8 | # rest:
9 | # delay:
10 | # fixedDelay: 5
11 | # percent: 10
12 | # abort:
13 | # httpStatus: 421
14 | # percent: 100
15 | # highway:
16 | # delay:
17 | # fixedDelay: 2
18 | # percent: 100
19 | # abort:
20 | # percent: 30
21 | # ms1:
22 | # route: |
23 | # - precedence: 2
24 | # match:
25 | # source: source.service
26 | # traffic:
27 | # - tags:
28 | # version: 1.0
29 | # weight: 90
30 | # - tags:
31 | # version: 1.1
32 | # weight: 10
33 | # policy:
34 | # fault:
35 | # schemas:
36 | # sid1:
37 | # policy:
38 | # fault:
39 | # operations:
40 | # policy:
41 | # fault:
42 | # policy: # 微服务名级别治理策略
43 | # fault:
44 | # schemas: #schema级别治理策略
45 | # sid1:
46 | # policy:
47 | # fault:
48 | # operations: #operation级别治理策略
49 | # policy:
50 | # fault:
51 | # Provider: # format same as Consumer
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/zptracemipsle_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair(mipsle, mips64le). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build mipsle mips64le
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsMipsle is the registers used by mipsle binaries.
11 | type PtraceRegsMipsle struct {
12 | Regs [32]uint64
13 | Lo uint64
14 | Hi uint64
15 | Epc uint64
16 | Badvaddr uint64
17 | Status uint64
18 | Cause uint64
19 | }
20 |
21 | // PtraceGetRegsMipsle fetches the registers used by mipsle binaries.
22 | func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error {
23 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
24 | }
25 |
26 | // PtraceSetRegsMipsle sets the registers used by mipsle binaries.
27 | func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error {
28 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
29 | }
30 |
31 | // PtraceRegsMips64le is the registers used by mips64le binaries.
32 | type PtraceRegsMips64le struct {
33 | Regs [32]uint64
34 | Lo uint64
35 | Hi uint64
36 | Epc uint64
37 | Badvaddr uint64
38 | Status uint64
39 | Cause uint64
40 | }
41 |
42 | // PtraceGetRegsMips64le fetches the registers used by mips64le binaries.
43 | func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error {
44 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
45 | }
46 |
47 | // PtraceSetRegsMips64le sets the registers used by mips64le binaries.
48 | func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error {
49 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
50 | }
51 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/net/http2/Dockerfile:
--------------------------------------------------------------------------------
1 | #
2 | # This Dockerfile builds a recent curl with HTTP/2 client support, using
3 | # a recent nghttp2 build.
4 | #
5 | # See the Makefile for how to tag it. If Docker and that image is found, the
6 | # Go tests use this curl binary for integration tests.
7 | #
8 |
9 | FROM ubuntu:trusty
10 |
11 | RUN apt-get update && \
12 | apt-get upgrade -y && \
13 | apt-get install -y git-core build-essential wget
14 |
15 | RUN apt-get install -y --no-install-recommends \
16 | autotools-dev libtool pkg-config zlib1g-dev \
17 | libcunit1-dev libssl-dev libxml2-dev libevent-dev \
18 | automake autoconf
19 |
20 | # The list of packages nghttp2 recommends for h2load:
21 | RUN apt-get install -y --no-install-recommends make binutils \
22 | autoconf automake autotools-dev \
23 | libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev \
24 | libev-dev libevent-dev libjansson-dev libjemalloc-dev \
25 | cython python3.4-dev python-setuptools
26 |
27 | # Note: setting NGHTTP2_VER before the git clone, so an old git clone isn't cached:
28 | ENV NGHTTP2_VER 895da9a
29 | RUN cd /root && git clone https://github.com/tatsuhiro-t/nghttp2.git
30 |
31 | WORKDIR /root/nghttp2
32 | RUN git reset --hard $NGHTTP2_VER
33 | RUN autoreconf -i
34 | RUN automake
35 | RUN autoconf
36 | RUN ./configure
37 | RUN make
38 | RUN make install
39 |
40 | WORKDIR /root
41 | RUN wget http://curl.haxx.se/download/curl-7.45.0.tar.gz
42 | RUN tar -zxvf curl-7.45.0.tar.gz
43 | WORKDIR /root/curl-7.45.0
44 | RUN ./configure --with-ssl --with-nghttp2=/usr/local
45 | RUN make
46 | RUN make install
47 | RUN ldconfig
48 |
49 | CMD ["-h"]
50 | ENTRYPOINT ["/usr/local/bin/curl"]
51 |
52 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/peer/peer.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2014 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | // Package peer defines various peer information associated with RPCs and
20 | // corresponding utils.
21 | package peer
22 |
23 | import (
24 | "net"
25 |
26 | "golang.org/x/net/context"
27 | "google.golang.org/grpc/credentials"
28 | )
29 |
30 | // Peer contains the information of the peer for an RPC, such as the address
31 | // and authentication information.
32 | type Peer struct {
33 | // Addr is the peer address.
34 | Addr net.Addr
35 | // AuthInfo is the authentication information of the transport.
36 | // It is nil if there is no transport security being used.
37 | AuthInfo credentials.AuthInfo
38 | }
39 |
40 | type peerKey struct{}
41 |
42 | // NewContext creates a new context with peer information attached.
43 | func NewContext(ctx context.Context, p *Peer) context.Context {
44 | return context.WithValue(ctx, peerKey{}, p)
45 | }
46 |
47 | // FromContext returns the peer information in ctx if it exists.
48 | func FromContext(ctx context.Context) (p *Peer, ok bool) {
49 | p, ok = ctx.Value(peerKey{}).(*Peer)
50 | return
51 | }
52 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/credentials/go18.go:
--------------------------------------------------------------------------------
1 | // +build go1.8
2 |
3 | /*
4 | *
5 | * Copyright 2017 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package credentials
22 |
23 | import (
24 | "crypto/tls"
25 | )
26 |
27 | func init() {
28 | cipherSuiteLookup[tls.TLS_RSA_WITH_AES_128_CBC_SHA256] = "TLS_RSA_WITH_AES_128_CBC_SHA256"
29 | cipherSuiteLookup[tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256] = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
30 | cipherSuiteLookup[tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256] = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
31 | cipherSuiteLookup[tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305] = "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
32 | cipherSuiteLookup[tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305] = "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
33 | }
34 |
35 | // cloneTLSConfig returns a shallow clone of the exported
36 | // fields of cfg, ignoring the unexported sync.Once, which
37 | // contains a mutex and must not be copied.
38 | //
39 | // If cfg is nil, a new zero tls.Config is returned.
40 | func cloneTLSConfig(cfg *tls.Config) *tls.Config {
41 | if cfg == nil {
42 | return &tls.Config{}
43 | }
44 |
45 | return cfg.Clone()
46 | }
47 |
--------------------------------------------------------------------------------
/protocol/grpc-go/README.md:
--------------------------------------------------------------------------------
1 | # Go-Mesher-Example
2 |
3 | This example illustrates the mesher integration with grpc
4 |
5 |
6 | ## Getting Started
7 |
8 | ### Using DockerCompose
9 |
10 | To run this example using docker compose you can execute the following commands
11 |
12 | ##### Step 1
13 | Clone this repo
14 | ```
15 | git clone https://github.com/go-mesh/mesher-examples
16 | cd protocol/grpc-go/helloworld
17 | ```
18 |
19 | ##### Step 2
20 | Run Docker-Compose to bring up all the containers
21 | ```
22 | ./launch.sh
23 | ```
24 | This will bring up Service-Center, Client, Server, MesherConsumer, MesherProvider
25 |
26 | ```
27 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
28 | 865a08bb0b6d client-grpc "/bin/sh -c /go/bin/…" About a minute ago Up About a minute helloworld_Client_1
29 | c9d6961e3170 server-grpc "/bin/sh -c /go/bin/…" About a minute ago Up About a minute helloworld_Server_1
30 | e41ed66b25bf gochassis/mesher "sh /opt/mesher/star…" About a minute ago Up About a minute 0.0.0.0:9000->3000/tcp helloworld_MesherConsumer_1
31 | ebb6ea1ac117 gochassis/mesher "sh /opt/mesher/star…" About a minute ago Up About a minute helloworld_MesherProvider_1
32 | e3fe6ea5cfdc servicecomb/service-center "/app/service-center" 9 minutes ago Up About a minute 0.0.0.0:30100->30100/tcp helloworld_ServiceCenter_1
33 | ```
34 |
35 | ##### Step 3
36 | You can verify by log of client side, it interval access to server and print log
37 | ```
38 | Greeting: Hello world
39 | ```
40 |
41 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/asm_linux_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for 386, Linux
11 | //
12 |
13 | // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80
14 | // instead of the glibc-specific "CALL 0x10(GS)".
15 | #define INVOKE_SYSCALL INT $0x80
16 |
17 | // Just jump to package syscall's implementation for all these functions.
18 | // The runtime may know about them.
19 |
20 | TEXT ·Syscall(SB),NOSPLIT,$0-28
21 | JMP syscall·Syscall(SB)
22 |
23 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
24 | JMP syscall·Syscall6(SB)
25 |
26 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
27 | CALL runtime·entersyscall(SB)
28 | MOVL trap+0(FP), AX // syscall entry
29 | MOVL a1+4(FP), BX
30 | MOVL a2+8(FP), CX
31 | MOVL a3+12(FP), DX
32 | MOVL $0, SI
33 | MOVL $0, DI
34 | INVOKE_SYSCALL
35 | MOVL AX, r1+16(FP)
36 | MOVL DX, r2+20(FP)
37 | CALL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVL trap+0(FP), AX // syscall entry
48 | MOVL a1+4(FP), BX
49 | MOVL a2+8(FP), CX
50 | MOVL a3+12(FP), DX
51 | MOVL $0, SI
52 | MOVL $0, DI
53 | INVOKE_SYSCALL
54 | MOVL AX, r1+16(FP)
55 | MOVL DX, r2+20(FP)
56 | RET
57 |
58 | TEXT ·socketcall(SB),NOSPLIT,$0-36
59 | JMP syscall·socketcall(SB)
60 |
61 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
62 | JMP syscall·rawsocketcall(SB)
63 |
64 | TEXT ·seek(SB),NOSPLIT,$0-28
65 | JMP syscall·seek(SB)
66 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/internal/transport/go16.go:
--------------------------------------------------------------------------------
1 | // +build go1.6,!go1.7
2 |
3 | /*
4 | *
5 | * Copyright 2016 gRPC authors.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | *
19 | */
20 |
21 | package transport
22 |
23 | import (
24 | "net"
25 | "net/http"
26 |
27 | "google.golang.org/grpc/codes"
28 | "google.golang.org/grpc/status"
29 |
30 | "golang.org/x/net/context"
31 | )
32 |
33 | // dialContext connects to the address on the named network.
34 | func dialContext(ctx context.Context, network, address string) (net.Conn, error) {
35 | return (&net.Dialer{Cancel: ctx.Done()}).Dial(network, address)
36 | }
37 |
38 | // ContextErr converts the error from context package into a status error.
39 | func ContextErr(err error) error {
40 | switch err {
41 | case context.DeadlineExceeded:
42 | return status.Error(codes.DeadlineExceeded, err.Error())
43 | case context.Canceled:
44 | return status.Error(codes.Canceled, err.Error())
45 | }
46 | return status.Errorf(codes.Internal, "Unexpected error from context packet: %v", err)
47 | }
48 |
49 | // contextFromRequest returns a background context.
50 | func contextFromRequest(r *http.Request) context.Context {
51 | return context.Background()
52 | }
53 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/golang.org/x/sys/unix/dev_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used by the Linux kernel and glibc.
7 | //
8 | // The information below is extracted and adapted from bits/sysmacros.h in the
9 | // glibc sources:
10 | //
11 | // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's
12 | // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major
13 | // number and m is a hex digit of the minor number. This is backward compatible
14 | // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also
15 | // backward compatible with the Linux kernel, which for some architectures uses
16 | // 32-bit dev_t, encoded as mmmM MMmm.
17 |
18 | package unix
19 |
20 | // Major returns the major component of a Linux device number.
21 | func Major(dev uint64) uint32 {
22 | major := uint32((dev & 0x00000000000fff00) >> 8)
23 | major |= uint32((dev & 0xfffff00000000000) >> 32)
24 | return major
25 | }
26 |
27 | // Minor returns the minor component of a Linux device number.
28 | func Minor(dev uint64) uint32 {
29 | minor := uint32((dev & 0x00000000000000ff) >> 0)
30 | minor |= uint32((dev & 0x00000ffffff00000) >> 12)
31 | return minor
32 | }
33 |
34 | // Mkdev returns a Linux device number generated from the given major and minor
35 | // components.
36 | func Mkdev(major, minor uint32) uint64 {
37 | dev := (uint64(major) & 0x00000fff) << 8
38 | dev |= (uint64(major) & 0xfffff000) << 32
39 | dev |= (uint64(minor) & 0x000000ff) << 0
40 | dev |= (uint64(minor) & 0xffffff00) << 12
41 | return dev
42 | }
43 |
--------------------------------------------------------------------------------
/protocol/grpc-go/helloworld/vendor/google.golang.org/grpc/codes/code_string.go:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Copyright 2017 gRPC authors.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | *
17 | */
18 |
19 | package codes
20 |
21 | import "strconv"
22 |
23 | func (c Code) String() string {
24 | switch c {
25 | case OK:
26 | return "OK"
27 | case Canceled:
28 | return "Canceled"
29 | case Unknown:
30 | return "Unknown"
31 | case InvalidArgument:
32 | return "InvalidArgument"
33 | case DeadlineExceeded:
34 | return "DeadlineExceeded"
35 | case NotFound:
36 | return "NotFound"
37 | case AlreadyExists:
38 | return "AlreadyExists"
39 | case PermissionDenied:
40 | return "PermissionDenied"
41 | case ResourceExhausted:
42 | return "ResourceExhausted"
43 | case FailedPrecondition:
44 | return "FailedPrecondition"
45 | case Aborted:
46 | return "Aborted"
47 | case OutOfRange:
48 | return "OutOfRange"
49 | case Unimplemented:
50 | return "Unimplemented"
51 | case Internal:
52 | return "Internal"
53 | case Unavailable:
54 | return "Unavailable"
55 | case DataLoss:
56 | return "DataLoss"
57 | case Unauthenticated:
58 | return "Unauthenticated"
59 | default:
60 | return "Code(" + strconv.FormatInt(int64(c), 10) + ")"
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Infrastructure/kubernetes/servicecomb/client/client-mesher.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: client-mesher
5 | labels:
6 | app: client-mesher
7 | version: 0.0.1
8 | spec:
9 | affinity:
10 | podAffinity:
11 | requiredDuringSchedulingIgnoredDuringExecution:
12 | - labelSelector:
13 | matchExpressions:
14 | - key: app
15 | operator: In
16 | values:
17 | - perf
18 | topologyKey: kubernetes.io/hostname
19 | containers:
20 | - name: client
21 | image: xiaoliang/client-go
22 | env:
23 | - name: TARGET
24 | value: http://server-mesher/
25 | - name: http_proxy
26 | value: http://127.0.0.1:30101/
27 | ports:
28 | - containerPort: 9000
29 | resources:
30 | limits:
31 | cpu: "0.5"
32 | - name: mesher
33 | image: xiaoliang/mesher
34 | env:
35 | - name: SERVICE_NAME
36 | valueFrom:
37 | fieldRef:
38 | fieldPath: metadata.name
39 | - name: CSE_REGISTRY_ADDR
40 | # value: http://service-center.default:30100
41 | value: http://192.168.1.94:30100
42 | ports:
43 | - containerPort: 30101
44 | - containerPort: 30102
45 | - containerPort: 6060
46 | resources:
47 | limits:
48 | cpu: "0.5"
49 | ---
50 | apiVersion: v1
51 | kind: Service
52 | apiVersion: v1
53 | metadata:
54 | name: client-mesher
55 | spec:
56 | selector:
57 | app: client-mesher
58 | ports:
59 | - protocol: TCP
60 | name: client
61 | port: 30107
62 | nodePort: 30107
63 | targetPort: 9000
64 | - protocol: TCP
65 | name: client-mesher
66 | port: 30106
67 | nodePort: 30106
68 | targetPort: 30101
69 | type: NodePort
--------------------------------------------------------------------------------