mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #1182 from coreos/cors
pkg: move cors.go to /pkg/cors.go
This commit is contained in:
commit
9e46d54483
8
main.go
8
main.go
@ -45,7 +45,7 @@ var (
|
|||||||
|
|
||||||
peers = &etcdhttp.Peers{}
|
peers = &etcdhttp.Peers{}
|
||||||
addrs = &Addrs{}
|
addrs = &Addrs{}
|
||||||
cors = &CORSInfo{}
|
cors = &pkg.CORSInfo{}
|
||||||
proxyFlag = new(ProxyFlag)
|
proxyFlag = new(ProxyFlag)
|
||||||
|
|
||||||
proxyFlagValues = []string{
|
proxyFlagValues = []string{
|
||||||
@ -208,11 +208,11 @@ func startEtcd() {
|
|||||||
}
|
}
|
||||||
s.Start()
|
s.Start()
|
||||||
|
|
||||||
ch := &CORSHandler{
|
ch := &pkg.CORSHandler{
|
||||||
Handler: etcdhttp.NewClientHandler(s, *peers, *timeout),
|
Handler: etcdhttp.NewClientHandler(s, *peers, *timeout),
|
||||||
Info: cors,
|
Info: cors,
|
||||||
}
|
}
|
||||||
ph := &CORSHandler{
|
ph := &pkg.CORSHandler{
|
||||||
Handler: etcdhttp.NewPeerHandler(s),
|
Handler: etcdhttp.NewPeerHandler(s),
|
||||||
Info: cors,
|
Info: cors,
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ func startProxy() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ph = &CORSHandler{
|
ph = &pkg.CORSHandler{
|
||||||
Handler: ph,
|
Handler: ph,
|
||||||
Info: cors,
|
Info: cors,
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package pkg
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
Loading…
x
Reference in New Issue
Block a user