MM-24817: Bump hashicorp/memberlist (#14467)

Automatic Merge
Этот коммит содержится в:
Agniva De Sarker
2020-05-12 21:02:16 +05:30
коммит произвёл GitHub
родитель 65733f4969
Коммит 9dc64173dc
67 изменённых файлов: 914 добавлений и 256 удалений

8
go.mod
Просмотреть файл

@@ -41,7 +41,7 @@ require (
github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.1 // indirect github.com/hashicorp/go-uuid v1.0.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/memberlist v0.1.5 github.com/hashicorp/memberlist v0.2.2
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect
github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7
@@ -100,11 +100,11 @@ require (
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
github.com/ziutek/mymysql v1.5.4 // indirect github.com/ziutek/mymysql v1.5.4 // indirect
go.uber.org/zap v1.15.0 go.uber.org/zap v1.15.0
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 golang.org/x/image v0.0.0-20200119044424-58c23975cae1
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5
golang.org/x/sys v0.0.0-20200427175716-29b57079015a // indirect golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect
golang.org/x/text v0.3.2 golang.org/x/text v0.3.2
golang.org/x/tools v0.0.0-20200428021058-7ae4988eb4d9 golang.org/x/tools v0.0.0-20200428021058-7ae4988eb4d9
google.golang.org/genproto v0.0.0-20200424135956-bca184e23272 // indirect google.golang.org/genproto v0.0.0-20200424135956-bca184e23272 // indirect

24
go.sum
Просмотреть файл

@@ -248,8 +248,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/memberlist v0.1.5 h1:AYBsgJOW9gab/toO5tEB8lWetVgDKZycqkebJ8xxpqM= github.com/hashicorp/memberlist v0.2.2 h1:5+RffWKwqJ71YPu9mWsF7ZOscZmwfasdA8kbdC7AO2g=
github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d h1:W+SIwDdl3+jXWeidYySAgzytE3piq6GumXeBjFBG67c= github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d h1:W+SIwDdl3+jXWeidYySAgzytE3piq6GumXeBjFBG67c=
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
@@ -340,7 +340,7 @@ github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsO
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg= github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg=
github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
github.com/minio/minio-go/v6 v6.0.55 h1:Hqm41952DdRNKXM+6hCnPXCsHCYSgLf03iuYoxJG2Wk= github.com/minio/minio-go/v6 v6.0.55 h1:Hqm41952DdRNKXM+6hCnPXCsHCYSgLf03iuYoxJG2Wk=
@@ -599,7 +599,6 @@ go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
@@ -607,9 +606,10 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc h1:ZGI/fILM2+ueot/UixBSoj9188jCAxVHEZEGhqq67I4= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79 h1:IaQbIIB2X/Mp/DKctl6ROxz1KyMlKp4uyvL6+kQ7C88=
golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc= golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc=
@@ -636,7 +636,6 @@ golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -653,8 +652,8 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 h1:Jcxah/M+oLZ/R4/z5RzfPzGbPXnVDPkEDtf2JnuxN+U= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5 h1:WQ8q63x+f/zpC8Ac1s9wLElVoHhm32p6tudrU72n1QA=
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -675,7 +674,6 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -688,6 +686,7 @@ golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -697,8 +696,8 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200427175716-29b57079015a h1:08u6b1caTT9MQY4wSbmsd4Ulm6DmgNYnbImBuZjGJow= golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w=
golang.org/x/sys v0.0.0-20200427175716-29b57079015a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
@@ -721,6 +720,7 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=

15
vendor/github.com/hashicorp/memberlist/.travis.yml сгенерированный поставляемый
Просмотреть файл

@@ -1,15 +0,0 @@
language: go
sudo: true
go:
- "1.x"
branches:
only:
- master
install: true
env:
- GO111MODULE=on # Enable Go modules in 1.11

29
vendor/github.com/hashicorp/memberlist/Makefile сгенерированный поставляемый
Просмотреть файл

@@ -1,6 +1,10 @@
DEPS := $(shell go list -f '{{range .Imports}}{{.}} {{end}}' ./...) SHELL := bash
test: subnet GOFILES ?= $(shell go list ./... | grep -v /vendor/)
default: test
test: vet subnet
go test ./... go test ./...
integ: subnet integ: subnet
@@ -10,11 +14,20 @@ subnet:
./test/setup_subnet.sh ./test/setup_subnet.sh
cov: cov:
gocov test github.com/hashicorp/memberlist | gocov-html > /tmp/coverage.html go test ./... -coverprofile=coverage.out
open /tmp/coverage.html go tool cover -html=coverage.out
deps: format:
go get -t -d -v ./... @echo "--> Running go fmt"
echo $(DEPS) | xargs -n1 go get -d @go fmt $(GOFILES)
.PHONY: test cov integ vet:
@echo "--> Running go vet"
@go vet -tags '$(GOTAGS)' $(GOFILES); if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
exit 1; \
fi
.PHONY: default test integ subnet cov format vet

4
vendor/github.com/hashicorp/memberlist/README.md сгенерированный поставляемый
Просмотреть файл

@@ -1,4 +1,4 @@
# memberlist [![GoDoc](https://godoc.org/github.com/hashicorp/memberlist?status.png)](https://godoc.org/github.com/hashicorp/memberlist) [![Build Status](https://travis-ci.org/hashicorp/memberlist.svg?branch=master)](https://travis-ci.org/hashicorp/memberlist) # memberlist [![GoDoc](https://godoc.org/github.com/hashicorp/memberlist?status.png)](https://godoc.org/github.com/hashicorp/memberlist) [![CircleCI](https://circleci.com/gh/hashicorp/memberlist.svg?style=svg)](https://circleci.com/gh/hashicorp/memberlist)
memberlist is a [Go](http://www.golang.org) library that manages cluster memberlist is a [Go](http://www.golang.org) library that manages cluster
membership and member failure detection using a gossip based protocol. membership and member failure detection using a gossip based protocol.
@@ -23,8 +23,6 @@ Please check your installation with:
go version go version
``` ```
Run `make deps` to fetch dependencies before building
## Usage ## Usage
Memberlist is surprisingly simple to use. An example is shown below: Memberlist is surprisingly simple to use. An example is shown below:

61
vendor/github.com/hashicorp/memberlist/config.go сгенерированный поставляемый
Просмотреть файл

@@ -1,10 +1,15 @@
package memberlist package memberlist
import ( import (
"fmt"
"io" "io"
"log" "log"
"net"
"os" "os"
"strings"
"time" "time"
multierror "github.com/hashicorp/go-multierror"
) )
type Config struct { type Config struct {
@@ -116,6 +121,10 @@ type Config struct {
// indirect UDP pings. // indirect UDP pings.
DisableTcpPings bool DisableTcpPings bool
// DisableTcpPingsForNode is like DisableTcpPings, but lets you control
// whether to perform TCP pings on a node-by-node basis.
DisableTcpPingsForNode func(nodeName string) bool
// AwarenessMaxMultiplier will increase the probe interval if the node // AwarenessMaxMultiplier will increase the probe interval if the node
// becomes aware that it might be degraded and not meeting the soft real // becomes aware that it might be degraded and not meeting the soft real
// time requirements to reliably probe other nodes. // time requirements to reliably probe other nodes.
@@ -220,6 +229,39 @@ type Config struct {
// reclaimed by one with a different address or port. By default, this is 0, // reclaimed by one with a different address or port. By default, this is 0,
// meaning nodes cannot be reclaimed this way. // meaning nodes cannot be reclaimed this way.
DeadNodeReclaimTime time.Duration DeadNodeReclaimTime time.Duration
// RequireNodeNames controls if the name of a node is required when sending
// a message to that node.
RequireNodeNames bool
// CIDRsAllowed If nil, allow any connection (default), otherwise specify all networks
// allowed to connect (you must specify IPv6/IPv4 separately)
// Using [] will block all connections.
CIDRsAllowed []net.IPNet
}
// ParseCIDRs return a possible empty list of all Network that have been parsed
// In case of error, it returns succesfully parsed CIDRs and the last error found
func ParseCIDRs(v []string) ([]net.IPNet, error) {
nets := make([]net.IPNet, 0)
if v == nil {
return nets, nil
}
var errs error
hasErrors := false
for _, p := range v {
_, net, err := net.ParseCIDR(strings.TrimSpace(p))
if err != nil {
err = fmt.Errorf("invalid cidr: %s", p)
errs = multierror.Append(errs, err)
hasErrors = true
} else {
nets = append(nets, *net)
}
}
if !hasErrors {
errs = nil
}
return nets, errs
} }
// DefaultLANConfig returns a sane set of configurations for Memberlist. // DefaultLANConfig returns a sane set of configurations for Memberlist.
@@ -263,6 +305,7 @@ func DefaultLANConfig() *Config {
HandoffQueueDepth: 1024, HandoffQueueDepth: 1024,
UDPBufferSize: 1400, UDPBufferSize: 1400,
CIDRsAllowed: nil, // same as allow all
} }
} }
@@ -282,6 +325,24 @@ func DefaultWANConfig() *Config {
return conf return conf
} }
// IPMustBeChecked return true if IPAllowed must be called
func (c *Config) IPMustBeChecked() bool {
return len(c.CIDRsAllowed) > 0
}
// IPAllowed return an error if access to memberlist is denied
func (c *Config) IPAllowed(ip net.IP) error {
if !c.IPMustBeChecked() {
return nil
}
for _, n := range c.CIDRsAllowed {
if n.Contains(ip) {
return nil
}
}
return fmt.Errorf("%s is not allowed", ip)
}
// DefaultLocalConfig works like DefaultConfig, however it returns a configuration // DefaultLocalConfig works like DefaultConfig, however it returns a configuration
// that is optimized for a local loopback environments. The default configuration is // that is optimized for a local loopback environments. The default configuration is
// still very conservative and errs on the side of caution. // still very conservative and errs on the side of caution.

8
vendor/github.com/hashicorp/memberlist/go.mod сгенерированный поставляемый
Просмотреть файл

@@ -1,5 +1,7 @@
module github.com/hashicorp/memberlist module github.com/hashicorp/memberlist
go 1.12
require ( require (
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
@@ -8,13 +10,9 @@ require (
github.com/hashicorp/go-msgpack v0.5.3 github.com/hashicorp/go-msgpack v0.5.3
github.com/hashicorp/go-multierror v1.0.0 github.com/hashicorp/go-multierror v1.0.0
github.com/hashicorp/go-sockaddr v1.0.0 github.com/hashicorp/go-sockaddr v1.0.0
github.com/miekg/dns v1.0.14 github.com/miekg/dns v1.1.26
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
github.com/stretchr/testify v1.2.2 github.com/stretchr/testify v1.2.2
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 // indirect
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 // indirect
) )

30
vendor/github.com/hashicorp/memberlist/go.sum сгенерированный поставляемый
Просмотреть файл

@@ -18,8 +18,8 @@ github.com/hashicorp/go-uuid v1.0.0 h1:RS8zrF7PhGwyNPOtxSClXXj9HA8feRnJzgnI1RJCS
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.1.26 h1:gPxPSwALAeHJSjarOs00QjVdV9QoBvc1D2ujQUr5BzU=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -28,11 +28,21 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3 h1:KYQXGkl6vs02hK7pK4eIbw0NpNPedieTSTEiJ//bwGs= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519 h1:x6rhz8Y9CjbgQkccRGmELH6K+LJj7tOoh3XWeC1yaQM= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5 h1:x6r4Jo0KNzOOzYd8lbcRsqjuqEASK6ob3auvWYM4/8U= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe h1:6fAMxZRR6sl1Uq8U61gxU+kPTs2tR8uOySCbBP7BN/M=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

8
vendor/github.com/hashicorp/memberlist/logging.go сгенерированный поставляемый
Просмотреть файл

@@ -13,6 +13,14 @@ func LogAddress(addr net.Addr) string {
return fmt.Sprintf("from=%s", addr.String()) return fmt.Sprintf("from=%s", addr.String())
} }
func LogStringAddress(addr string) string {
if addr == "" {
return "from=<unknown address>"
}
return fmt.Sprintf("from=%s", addr)
}
func LogConn(conn net.Conn) string { func LogConn(conn net.Conn) string {
if conn == nil { if conn == nil {
return LogAddress(nil) return LogAddress(nil)

125
vendor/github.com/hashicorp/memberlist/memberlist.go сгенерированный поставляемый
Просмотреть файл

@@ -16,6 +16,7 @@ package memberlist
import ( import (
"container/list" "container/list"
"errors"
"fmt" "fmt"
"log" "log"
"net" "net"
@@ -31,12 +32,18 @@ import (
"github.com/miekg/dns" "github.com/miekg/dns"
) )
var errNodeNamesAreRequired = errors.New("memberlist: node names are required by configuration but one was not provided")
type Memberlist struct { type Memberlist struct {
sequenceNum uint32 // Local sequence number sequenceNum uint32 // Local sequence number
incarnation uint32 // Local incarnation number incarnation uint32 // Local incarnation number
numNodes uint32 // Number of known nodes (estimate) numNodes uint32 // Number of known nodes (estimate)
pushPullReq uint32 // Number of push/pull requests pushPullReq uint32 // Number of push/pull requests
advertiseLock sync.RWMutex
advertiseAddr net.IP
advertisePort uint16
config *Config config *Config
shutdown int32 // Used as an atomic boolean value shutdown int32 // Used as an atomic boolean value
shutdownCh chan struct{} shutdownCh chan struct{}
@@ -46,7 +53,7 @@ type Memberlist struct {
shutdownLock sync.Mutex // Serializes calls to Shutdown shutdownLock sync.Mutex // Serializes calls to Shutdown
leaveLock sync.Mutex // Serializes calls to Leave leaveLock sync.Mutex // Serializes calls to Leave
transport Transport transport NodeAwareTransport
handoffCh chan struct{} handoffCh chan struct{}
highPriorityMsgQueue *list.List highPriorityMsgQueue *list.List
@@ -55,8 +62,8 @@ type Memberlist struct {
nodeLock sync.RWMutex nodeLock sync.RWMutex
nodes []*nodeState // Known nodes nodes []*nodeState // Known nodes
nodeMap map[string]*nodeState // Maps Addr.String() -> NodeState nodeMap map[string]*nodeState // Maps Node.Name -> NodeState
nodeTimers map[string]*suspicion // Maps Addr.String() -> suspicion timer nodeTimers map[string]*suspicion // Maps Node.Name -> suspicion timer
awareness *awareness awareness *awareness
tickerLock sync.Mutex tickerLock sync.Mutex
@@ -174,11 +181,17 @@ func newMemberlist(conf *Config) (*Memberlist, error) {
transport = nt transport = nt
} }
nodeAwareTransport, ok := transport.(NodeAwareTransport)
if !ok {
logger.Printf("[DEBUG] memberlist: configured Transport is not a NodeAwareTransport and some features may not work as desired")
nodeAwareTransport = &shimNodeAwareTransport{transport}
}
m := &Memberlist{ m := &Memberlist{
config: conf, config: conf,
shutdownCh: make(chan struct{}), shutdownCh: make(chan struct{}),
leaveBroadcast: make(chan struct{}, 1), leaveBroadcast: make(chan struct{}, 1),
transport: transport, transport: nodeAwareTransport,
handoffCh: make(chan struct{}, 1), handoffCh: make(chan struct{}, 1),
highPriorityMsgQueue: list.New(), highPriorityMsgQueue: list.New(),
lowPriorityMsgQueue: list.New(), lowPriorityMsgQueue: list.New(),
@@ -192,6 +205,14 @@ func newMemberlist(conf *Config) (*Memberlist, error) {
m.broadcasts.NumNodes = func() int { m.broadcasts.NumNodes = func() int {
return m.estNumNodes() return m.estNumNodes()
} }
// Get the final advertise address from the transport, which may need
// to see which address we bound to. We'll refresh this each time we
// send out an alive message.
if _, _, err := m.refreshAdvertise(); err != nil {
return nil, err
}
go m.streamListen() go m.streamListen()
go m.packetListen() go m.packetListen()
go m.packetHandler() go m.packetHandler()
@@ -239,7 +260,8 @@ func (m *Memberlist) Join(existing []string) (int, error) {
for _, addr := range addrs { for _, addr := range addrs {
hp := joinHostPort(addr.ip.String(), addr.port) hp := joinHostPort(addr.ip.String(), addr.port)
if err := m.pushPullNode(hp, true); err != nil { a := Address{Addr: hp, Name: addr.nodeName}
if err := m.pushPullNode(a, true); err != nil {
err = fmt.Errorf("Failed to join %s: %v", addr.ip, err) err = fmt.Errorf("Failed to join %s: %v", addr.ip, err)
errs = multierror.Append(errs, err) errs = multierror.Append(errs, err)
m.logger.Printf("[DEBUG] memberlist: %v", err) m.logger.Printf("[DEBUG] memberlist: %v", err)
@@ -257,8 +279,9 @@ func (m *Memberlist) Join(existing []string) (int, error) {
// ipPort holds information about a node we want to try to join. // ipPort holds information about a node we want to try to join.
type ipPort struct { type ipPort struct {
ip net.IP ip net.IP
port uint16 port uint16
nodeName string // optional
} }
// tcpLookupIP is a helper to initiate a TCP-based DNS lookup for the given host. // tcpLookupIP is a helper to initiate a TCP-based DNS lookup for the given host.
@@ -267,7 +290,7 @@ type ipPort struct {
// Consul's. By doing the TCP lookup directly, we get the best chance for the // Consul's. By doing the TCP lookup directly, we get the best chance for the
// largest list of hosts to join. Since joins are relatively rare events, it's ok // largest list of hosts to join. Since joins are relatively rare events, it's ok
// to do this rather expensive operation. // to do this rather expensive operation.
func (m *Memberlist) tcpLookupIP(host string, defaultPort uint16) ([]ipPort, error) { func (m *Memberlist) tcpLookupIP(host string, defaultPort uint16, nodeName string) ([]ipPort, error) {
// Don't attempt any TCP lookups against non-fully qualified domain // Don't attempt any TCP lookups against non-fully qualified domain
// names, since those will likely come from the resolv.conf file. // names, since those will likely come from the resolv.conf file.
if !strings.Contains(host, ".") { if !strings.Contains(host, ".") {
@@ -309,9 +332,9 @@ func (m *Memberlist) tcpLookupIP(host string, defaultPort uint16) ([]ipPort, err
for _, r := range in.Answer { for _, r := range in.Answer {
switch rr := r.(type) { switch rr := r.(type) {
case (*dns.A): case (*dns.A):
ips = append(ips, ipPort{rr.A, defaultPort}) ips = append(ips, ipPort{ip: rr.A, port: defaultPort, nodeName: nodeName})
case (*dns.AAAA): case (*dns.AAAA):
ips = append(ips, ipPort{rr.AAAA, defaultPort}) ips = append(ips, ipPort{ip: rr.AAAA, port: defaultPort, nodeName: nodeName})
case (*dns.CNAME): case (*dns.CNAME):
m.logger.Printf("[DEBUG] memberlist: Ignoring CNAME RR in TCP-first answer for '%s'", host) m.logger.Printf("[DEBUG] memberlist: Ignoring CNAME RR in TCP-first answer for '%s'", host)
} }
@@ -325,6 +348,16 @@ func (m *Memberlist) tcpLookupIP(host string, defaultPort uint16) ([]ipPort, err
// resolveAddr is used to resolve the address into an address, // resolveAddr is used to resolve the address into an address,
// port, and error. If no port is given, use the default // port, and error. If no port is given, use the default
func (m *Memberlist) resolveAddr(hostStr string) ([]ipPort, error) { func (m *Memberlist) resolveAddr(hostStr string) ([]ipPort, error) {
// First peel off any leading node name. This is optional.
nodeName := ""
if slashIdx := strings.Index(hostStr, "/"); slashIdx >= 0 {
if slashIdx == 0 {
return nil, fmt.Errorf("empty node name provided")
}
nodeName = hostStr[0:slashIdx]
hostStr = hostStr[slashIdx+1:]
}
// This captures the supplied port, or the default one. // This captures the supplied port, or the default one.
hostStr = ensurePort(hostStr, m.config.BindPort) hostStr = ensurePort(hostStr, m.config.BindPort)
host, sport, err := net.SplitHostPort(hostStr) host, sport, err := net.SplitHostPort(hostStr)
@@ -341,13 +374,15 @@ func (m *Memberlist) resolveAddr(hostStr string) ([]ipPort, error) {
// will make sure the host part is in good shape for parsing, even for // will make sure the host part is in good shape for parsing, even for
// IPv6 addresses. // IPv6 addresses.
if ip := net.ParseIP(host); ip != nil { if ip := net.ParseIP(host); ip != nil {
return []ipPort{ipPort{ip, port}}, nil return []ipPort{
ipPort{ip: ip, port: port, nodeName: nodeName},
}, nil
} }
// First try TCP so we have the best chance for the largest list of // First try TCP so we have the best chance for the largest list of
// hosts to join. If this fails it's not fatal since this isn't a standard // hosts to join. If this fails it's not fatal since this isn't a standard
// way to query DNS, and we have a fallback below. // way to query DNS, and we have a fallback below.
ips, err := m.tcpLookupIP(host, port) ips, err := m.tcpLookupIP(host, port, nodeName)
if err != nil { if err != nil {
m.logger.Printf("[DEBUG] memberlist: TCP-first lookup failed for '%s', falling back to UDP: %s", hostStr, err) m.logger.Printf("[DEBUG] memberlist: TCP-first lookup failed for '%s', falling back to UDP: %s", hostStr, err)
} }
@@ -364,7 +399,7 @@ func (m *Memberlist) resolveAddr(hostStr string) ([]ipPort, error) {
} }
ips = make([]ipPort, 0, len(ans)) ips = make([]ipPort, 0, len(ans))
for _, ip := range ans { for _, ip := range ans {
ips = append(ips, ipPort{ip, port}) ips = append(ips, ipPort{ip: ip, port: port, nodeName: nodeName})
} }
return ips, nil return ips, nil
} }
@@ -375,10 +410,9 @@ func (m *Memberlist) resolveAddr(hostStr string) ([]ipPort, error) {
func (m *Memberlist) setAlive() error { func (m *Memberlist) setAlive() error {
// Get the final advertise address from the transport, which may need // Get the final advertise address from the transport, which may need
// to see which address we bound to. // to see which address we bound to.
addr, port, err := m.transport.FinalAdvertiseAddr( addr, port, err := m.refreshAdvertise()
m.config.AdvertiseAddr, m.config.AdvertisePort)
if err != nil { if err != nil {
return fmt.Errorf("Failed to get final advertise address: %v", err) return err
} }
// Check if this is a public address without encryption // Check if this is a public address without encryption
@@ -414,9 +448,33 @@ func (m *Memberlist) setAlive() error {
Vsn: m.config.BuildVsnArray(), Vsn: m.config.BuildVsnArray(),
} }
m.aliveNode(&a, nil, true) m.aliveNode(&a, nil, true)
return nil return nil
} }
func (m *Memberlist) getAdvertise() (net.IP, uint16) {
m.advertiseLock.RLock()
defer m.advertiseLock.RUnlock()
return m.advertiseAddr, m.advertisePort
}
func (m *Memberlist) setAdvertise(addr net.IP, port int) {
m.advertiseLock.Lock()
defer m.advertiseLock.Unlock()
m.advertiseAddr = addr
m.advertisePort = uint16(port)
}
func (m *Memberlist) refreshAdvertise() (net.IP, int, error) {
addr, port, err := m.transport.FinalAdvertiseAddr(
m.config.AdvertiseAddr, m.config.AdvertisePort)
if err != nil {
return nil, 0, fmt.Errorf("Failed to get final advertise address: %v", err)
}
m.setAdvertise(addr, port)
return addr, port, nil
}
// LocalNode is used to return the local Node // LocalNode is used to return the local Node
func (m *Memberlist) LocalNode() *Node { func (m *Memberlist) LocalNode() *Node {
m.nodeLock.RLock() m.nodeLock.RLock()
@@ -472,24 +530,29 @@ func (m *Memberlist) UpdateNode(timeout time.Duration) error {
return nil return nil
} }
// SendTo is deprecated in favor of SendBestEffort, which requires a node to // Deprecated: SendTo is deprecated in favor of SendBestEffort, which requires a node to
// target. // target. If you don't have a node then use SendToAddress.
func (m *Memberlist) SendTo(to net.Addr, msg []byte) error { func (m *Memberlist) SendTo(to net.Addr, msg []byte) error {
a := Address{Addr: to.String(), Name: ""}
return m.SendToAddress(a, msg)
}
func (m *Memberlist) SendToAddress(a Address, msg []byte) error {
// Encode as a user message // Encode as a user message
buf := make([]byte, 1, len(msg)+1) buf := make([]byte, 1, len(msg)+1)
buf[0] = byte(userMsg) buf[0] = byte(userMsg)
buf = append(buf, msg...) buf = append(buf, msg...)
// Send the message // Send the message
return m.rawSendMsgPacket(to.String(), nil, buf) return m.rawSendMsgPacket(a, nil, buf)
} }
// SendToUDP is deprecated in favor of SendBestEffort. // Deprecated: SendToUDP is deprecated in favor of SendBestEffort.
func (m *Memberlist) SendToUDP(to *Node, msg []byte) error { func (m *Memberlist) SendToUDP(to *Node, msg []byte) error {
return m.SendBestEffort(to, msg) return m.SendBestEffort(to, msg)
} }
// SendToTCP is deprecated in favor of SendReliable. // Deprecated: SendToTCP is deprecated in favor of SendReliable.
func (m *Memberlist) SendToTCP(to *Node, msg []byte) error { func (m *Memberlist) SendToTCP(to *Node, msg []byte) error {
return m.SendReliable(to, msg) return m.SendReliable(to, msg)
} }
@@ -505,7 +568,8 @@ func (m *Memberlist) SendBestEffort(to *Node, msg []byte) error {
buf = append(buf, msg...) buf = append(buf, msg...)
// Send the message // Send the message
return m.rawSendMsgPacket(to.Address(), to, buf) a := Address{Addr: to.Address(), Name: to.Name}
return m.rawSendMsgPacket(a, to, buf)
} }
// SendReliable uses the reliable stream-oriented interface of the transport to // SendReliable uses the reliable stream-oriented interface of the transport to
@@ -513,7 +577,7 @@ func (m *Memberlist) SendBestEffort(to *Node, msg []byte) error {
// mechanism). Delivery is guaranteed if no error is returned, and there is no // mechanism). Delivery is guaranteed if no error is returned, and there is no
// limit on the size of the message. // limit on the size of the message.
func (m *Memberlist) SendReliable(to *Node, msg []byte) error { func (m *Memberlist) SendReliable(to *Node, msg []byte) error {
return m.sendUserMsg(to.Address(), msg) return m.sendUserMsg(to.FullAddress(), msg)
} }
// Members returns a list of all known live nodes. The node structures // Members returns a list of all known live nodes. The node structures
@@ -525,7 +589,7 @@ func (m *Memberlist) Members() []*Node {
nodes := make([]*Node, 0, len(m.nodes)) nodes := make([]*Node, 0, len(m.nodes))
for _, n := range m.nodes { for _, n := range m.nodes {
if n.State != stateDead { if !n.DeadOrLeft() {
nodes = append(nodes, &n.Node) nodes = append(nodes, &n.Node)
} }
} }
@@ -542,7 +606,7 @@ func (m *Memberlist) NumMembers() (alive int) {
defer m.nodeLock.RUnlock() defer m.nodeLock.RUnlock()
for _, n := range m.nodes { for _, n := range m.nodes {
if n.State != stateDead { if !n.DeadOrLeft() {
alive++ alive++
} }
} }
@@ -579,9 +643,14 @@ func (m *Memberlist) Leave(timeout time.Duration) error {
return nil return nil
} }
// This dead message is special, because Node and From are the
// same. This helps other nodes figure out that a node left
// intentionally. When Node equals From, other nodes know for
// sure this node is gone.
d := dead{ d := dead{
Incarnation: state.Incarnation, Incarnation: state.Incarnation,
Node: state.Name, Node: state.Name,
From: state.Name,
} }
m.deadNode(&d) m.deadNode(&d)
@@ -607,7 +676,7 @@ func (m *Memberlist) anyAlive() bool {
m.nodeLock.RLock() m.nodeLock.RLock()
defer m.nodeLock.RUnlock() defer m.nodeLock.RUnlock()
for _, n := range m.nodes { for _, n := range m.nodes {
if n.State != stateDead && n.Name != m.config.Name { if !n.DeadOrLeft() && n.Name != m.config.Name {
return true return true
} }
} }
@@ -630,7 +699,7 @@ func (m *Memberlist) ProtocolVersion() uint8 {
return m.config.ProtocolVersion return m.config.ProtocolVersion
} }
// Shutdown will stop any background maintanence of network activity // Shutdown will stop any background maintenance of network activity
// for this memberlist, causing it to appear "dead". A leave message // for this memberlist, causing it to appear "dead". A leave message
// will not be broadcasted prior, so the cluster being left will have // will not be broadcasted prior, so the cluster being left will have
// to detect this node's shutdown using probing. If you wish to more // to detect this node's shutdown using probing. If you wish to more
@@ -667,7 +736,7 @@ func (m *Memberlist) hasLeft() bool {
return atomic.LoadInt32(&m.leave) == 1 return atomic.LoadInt32(&m.leave) == 1
} }
func (m *Memberlist) getNodeState(addr string) nodeStateType { func (m *Memberlist) getNodeState(addr string) NodeStateType {
m.nodeLock.RLock() m.nodeLock.RLock()
defer m.nodeLock.RUnlock() defer m.nodeLock.RUnlock()

100
vendor/github.com/hashicorp/memberlist/mock_transport.go сгенерированный поставляемый
Просмотреть файл

@@ -1,7 +1,9 @@
package memberlist package memberlist
import ( import (
"bytes"
"fmt" "fmt"
"io"
"net" "net"
"strconv" "strconv"
"time" "time"
@@ -10,26 +12,33 @@ import (
// MockNetwork is used as a factory that produces MockTransport instances which // MockNetwork is used as a factory that produces MockTransport instances which
// are uniquely addressed and wired up to talk to each other. // are uniquely addressed and wired up to talk to each other.
type MockNetwork struct { type MockNetwork struct {
transports map[string]*MockTransport transportsByAddr map[string]*MockTransport
port int transportsByName map[string]*MockTransport
port int
} }
// NewTransport returns a new MockTransport with a unique address, wired up to // NewTransport returns a new MockTransport with a unique address, wired up to
// talk to the other transports in the MockNetwork. // talk to the other transports in the MockNetwork.
func (n *MockNetwork) NewTransport() *MockTransport { func (n *MockNetwork) NewTransport(name string) *MockTransport {
n.port += 1 n.port += 1
addr := fmt.Sprintf("127.0.0.1:%d", n.port) addr := fmt.Sprintf("127.0.0.1:%d", n.port)
transport := &MockTransport{ transport := &MockTransport{
net: n, net: n,
addr: &MockAddress{addr}, addr: &MockAddress{addr, name},
packetCh: make(chan *Packet), packetCh: make(chan *Packet),
streamCh: make(chan net.Conn), streamCh: make(chan net.Conn),
} }
if n.transports == nil { if n.transportsByAddr == nil {
n.transports = make(map[string]*MockTransport) n.transportsByAddr = make(map[string]*MockTransport)
} }
n.transports[addr] = transport n.transportsByAddr[addr] = transport
if n.transportsByName == nil {
n.transportsByName = make(map[string]*MockTransport)
}
n.transportsByName[name] = transport
return transport return transport
} }
@@ -37,6 +46,7 @@ func (n *MockNetwork) NewTransport() *MockTransport {
// address scheme. // address scheme.
type MockAddress struct { type MockAddress struct {
addr string addr string
name string
} }
// See net.Addr. // See net.Addr.
@@ -57,6 +67,8 @@ type MockTransport struct {
streamCh chan net.Conn streamCh chan net.Conn
} }
var _ NodeAwareTransport = (*MockTransport)(nil)
// See Transport. // See Transport.
func (t *MockTransport) FinalAdvertiseAddr(string, int) (net.IP, int, error) { func (t *MockTransport) FinalAdvertiseAddr(string, int) (net.IP, int, error) {
host, portStr, err := net.SplitHostPort(t.addr.String()) host, portStr, err := net.SplitHostPort(t.addr.String())
@@ -79,9 +91,15 @@ func (t *MockTransport) FinalAdvertiseAddr(string, int) (net.IP, int, error) {
// See Transport. // See Transport.
func (t *MockTransport) WriteTo(b []byte, addr string) (time.Time, error) { func (t *MockTransport) WriteTo(b []byte, addr string) (time.Time, error) {
dest, ok := t.net.transports[addr] a := Address{Addr: addr, Name: ""}
if !ok { return t.WriteToAddress(b, a)
return time.Time{}, fmt.Errorf("No route to %q", addr) }
// See NodeAwareTransport.
func (t *MockTransport) WriteToAddress(b []byte, a Address) (time.Time, error) {
dest, err := t.getPeer(a)
if err != nil {
return time.Time{}, err
} }
now := time.Now() now := time.Now()
@@ -98,11 +116,45 @@ func (t *MockTransport) PacketCh() <-chan *Packet {
return t.packetCh return t.packetCh
} }
// See NodeAwareTransport.
func (t *MockTransport) IngestPacket(conn net.Conn, addr net.Addr, now time.Time, shouldClose bool) error {
if shouldClose {
defer conn.Close()
}
// Copy everything from the stream into packet buffer.
var buf bytes.Buffer
if _, err := io.Copy(&buf, conn); err != nil {
return fmt.Errorf("failed to read packet: %v", err)
}
// Check the length - it needs to have at least one byte to be a proper
// message. This is checked elsewhere for writes coming in directly from
// the UDP socket.
if n := buf.Len(); n < 1 {
return fmt.Errorf("packet too short (%d bytes) %s", n, LogAddress(addr))
}
// Inject the packet.
t.packetCh <- &Packet{
Buf: buf.Bytes(),
From: addr,
Timestamp: now,
}
return nil
}
// See Transport. // See Transport.
func (t *MockTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) { func (t *MockTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) {
dest, ok := t.net.transports[addr] a := Address{Addr: addr, Name: ""}
if !ok { return t.DialAddressTimeout(a, timeout)
return nil, fmt.Errorf("No route to %q", addr) }
// See NodeAwareTransport.
func (t *MockTransport) DialAddressTimeout(a Address, timeout time.Duration) (net.Conn, error) {
dest, err := t.getPeer(a)
if err != nil {
return nil, err
} }
p1, p2 := net.Pipe() p1, p2 := net.Pipe()
@@ -115,7 +167,29 @@ func (t *MockTransport) StreamCh() <-chan net.Conn {
return t.streamCh return t.streamCh
} }
// See NodeAwareTransport.
func (t *MockTransport) IngestStream(conn net.Conn) error {
t.streamCh <- conn
return nil
}
// See Transport. // See Transport.
func (t *MockTransport) Shutdown() error { func (t *MockTransport) Shutdown() error {
return nil return nil
} }
func (t *MockTransport) getPeer(a Address) (*MockTransport, error) {
var (
dest *MockTransport
ok bool
)
if a.Name != "" {
dest, ok = t.net.transportsByName[a.Name]
} else {
dest, ok = t.net.transportsByAddr[a.Addr]
}
if !ok {
return nil, fmt.Errorf("No route to %s", a)
}
return dest, nil
}

191
vendor/github.com/hashicorp/memberlist/net.go сгенерированный поставляемый
Просмотреть файл

@@ -84,15 +84,28 @@ type ping struct {
// the intended recipient. This is to protect again an agent // the intended recipient. This is to protect again an agent
// restart with a new name. // restart with a new name.
Node string Node string
SourceAddr []byte `codec:",omitempty"` // Source address, used for a direct reply
SourcePort uint16 `codec:",omitempty"` // Source port, used for a direct reply
SourceNode string `codec:",omitempty"` // Source name, used for a direct reply
} }
// indirect ping sent to an indirect ndoe // indirect ping sent to an indirect node
type indirectPingReq struct { type indirectPingReq struct {
SeqNo uint32 SeqNo uint32
Target []byte Target []byte
Port uint16 Port uint16
Node string
Nack bool // true if we'd like a nack back // Node is sent so the target can verify they are
// the intended recipient. This is to protect against an agent
// restart with a new name.
Node string
Nack bool // true if we'd like a nack back
SourceAddr []byte `codec:",omitempty"` // Source address, used for a direct reply
SourcePort uint16 `codec:",omitempty"` // Source port, used for a direct reply
SourceNode string `codec:",omitempty"` // Source name, used for a direct reply
} }
// ack response is sent for a ping // ack response is sent for a ping
@@ -163,7 +176,7 @@ type pushNodeState struct {
Port uint16 Port uint16
Meta []byte Meta []byte
Incarnation uint32 Incarnation uint32
State nodeStateType State NodeStateType
Vsn []uint8 // Protocol versions Vsn []uint8 // Protocol versions
} }
@@ -207,9 +220,9 @@ func (m *Memberlist) streamListen() {
// handleConn handles a single incoming stream connection from the transport. // handleConn handles a single incoming stream connection from the transport.
func (m *Memberlist) handleConn(conn net.Conn) { func (m *Memberlist) handleConn(conn net.Conn) {
defer conn.Close()
m.logger.Printf("[DEBUG] memberlist: Stream connection %s", LogConn(conn)) m.logger.Printf("[DEBUG] memberlist: Stream connection %s", LogConn(conn))
defer conn.Close()
metrics.IncrCounter([]string{"memberlist", "tcp", "accept"}, 1) metrics.IncrCounter([]string{"memberlist", "tcp", "accept"}, 1)
conn.SetDeadline(time.Now().Add(m.config.TCPTimeout)) conn.SetDeadline(time.Now().Add(m.config.TCPTimeout))
@@ -483,7 +496,19 @@ func (m *Memberlist) handlePing(buf []byte, from net.Addr) {
if m.config.Ping != nil { if m.config.Ping != nil {
ack.Payload = m.config.Ping.AckPayload() ack.Payload = m.config.Ping.AckPayload()
} }
if err := m.encodeAndSendMsg(from.String(), ackRespMsg, &ack); err != nil {
addr := ""
if len(p.SourceAddr) > 0 && p.SourcePort > 0 {
addr = joinHostPort(net.IP(p.SourceAddr).String(), p.SourcePort)
} else {
addr = from.String()
}
a := Address{
Addr: addr,
Name: p.SourceNode,
}
if err := m.encodeAndSendMsg(a, ackRespMsg, &ack); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send ack: %s %s", err, LogAddress(from)) m.logger.Printf("[ERR] memberlist: Failed to send ack: %s %s", err, LogAddress(from))
} }
} }
@@ -503,7 +528,25 @@ func (m *Memberlist) handleIndirectPing(buf []byte, from net.Addr) {
// Send a ping to the correct host. // Send a ping to the correct host.
localSeqNo := m.nextSeqNo() localSeqNo := m.nextSeqNo()
ping := ping{SeqNo: localSeqNo, Node: ind.Node} selfAddr, selfPort := m.getAdvertise()
ping := ping{
SeqNo: localSeqNo,
Node: ind.Node,
// The outbound message is addressed FROM us.
SourceAddr: selfAddr,
SourcePort: selfPort,
SourceNode: m.config.Name,
}
// Forward the ack back to the requestor. If the request encodes an origin
// use that otherwise assume that the other end of the UDP socket is
// usable.
indAddr := ""
if len(ind.SourceAddr) > 0 && ind.SourcePort > 0 {
indAddr = joinHostPort(net.IP(ind.SourceAddr).String(), ind.SourcePort)
} else {
indAddr = from.String()
}
// Setup a response handler to relay the ack // Setup a response handler to relay the ack
cancelCh := make(chan struct{}) cancelCh := make(chan struct{})
@@ -511,18 +554,25 @@ func (m *Memberlist) handleIndirectPing(buf []byte, from net.Addr) {
// Try to prevent the nack if we've caught it in time. // Try to prevent the nack if we've caught it in time.
close(cancelCh) close(cancelCh)
// Forward the ack back to the requestor.
ack := ackResp{ind.SeqNo, nil} ack := ackResp{ind.SeqNo, nil}
if err := m.encodeAndSendMsg(from.String(), ackRespMsg, &ack); err != nil { a := Address{
m.logger.Printf("[ERR] memberlist: Failed to forward ack: %s %s", err, LogAddress(from)) Addr: indAddr,
Name: ind.SourceNode,
}
if err := m.encodeAndSendMsg(a, ackRespMsg, &ack); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to forward ack: %s %s", err, LogStringAddress(indAddr))
} }
} }
m.setAckHandler(localSeqNo, respHandler, m.config.ProbeTimeout) m.setAckHandler(localSeqNo, respHandler, m.config.ProbeTimeout)
// Send the ping. // Send the ping.
addr := joinHostPort(net.IP(ind.Target).String(), ind.Port) addr := joinHostPort(net.IP(ind.Target).String(), ind.Port)
if err := m.encodeAndSendMsg(addr, pingMsg, &ping); err != nil { a := Address{
m.logger.Printf("[ERR] memberlist: Failed to send indirect ping: %s %s", err, LogAddress(from)) Addr: addr,
Name: ind.Node,
}
if err := m.encodeAndSendMsg(a, pingMsg, &ping); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send indirect ping: %s %s", err, LogStringAddress(indAddr))
} }
// Setup a timer to fire off a nack if no ack is seen in time. // Setup a timer to fire off a nack if no ack is seen in time.
@@ -533,8 +583,12 @@ func (m *Memberlist) handleIndirectPing(buf []byte, from net.Addr) {
return return
case <-time.After(m.config.ProbeTimeout): case <-time.After(m.config.ProbeTimeout):
nack := nackResp{ind.SeqNo} nack := nackResp{ind.SeqNo}
if err := m.encodeAndSendMsg(from.String(), nackRespMsg, &nack); err != nil { a := Address{
m.logger.Printf("[ERR] memberlist: Failed to send nack: %s %s", err, LogAddress(from)) Addr: indAddr,
Name: ind.SourceNode,
}
if err := m.encodeAndSendMsg(a, nackRespMsg, &nack); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send nack: %s %s", err, LogStringAddress(indAddr))
} }
} }
}() }()
@@ -568,12 +622,47 @@ func (m *Memberlist) handleSuspect(buf []byte, from net.Addr) {
m.suspectNode(&sus) m.suspectNode(&sus)
} }
// ensureCanConnect return the IP from a RemoteAddress
// return error if this client must not connect
func (m *Memberlist) ensureCanConnect(from net.Addr) error {
if !m.config.IPMustBeChecked() {
return nil
}
source := from.String()
if source == "pipe" {
return nil
}
host, _, err := net.SplitHostPort(source)
if err != nil {
return err
}
ip := net.ParseIP(host)
if ip == nil {
return fmt.Errorf("Cannot parse IP from %s", host)
}
return m.config.IPAllowed(ip)
}
func (m *Memberlist) handleAlive(buf []byte, from net.Addr) { func (m *Memberlist) handleAlive(buf []byte, from net.Addr) {
if err := m.ensureCanConnect(from); err != nil {
m.logger.Printf("[DEBUG] memberlist: Blocked alive message: %s %s", err, LogAddress(from))
return
}
var live alive var live alive
if err := decode(buf, &live); err != nil { if err := decode(buf, &live); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to decode alive message: %s %s", err, LogAddress(from)) m.logger.Printf("[ERR] memberlist: Failed to decode alive message: %s %s", err, LogAddress(from))
return return
} }
if m.config.IPMustBeChecked() {
innerIP := net.IP(live.Addr)
if innerIP != nil {
if err := m.config.IPAllowed(innerIP); err != nil {
m.logger.Printf("[DEBUG] memberlist: Blocked alive.Addr=%s message from: %s %s", innerIP.String(), err, LogAddress(from))
return
}
}
}
// For proto versions < 2, there is no port provided. Mask old // For proto versions < 2, there is no port provided. Mask old
// behavior by using the configured port // behavior by using the configured port
@@ -615,12 +704,12 @@ func (m *Memberlist) handleCompressed(buf []byte, from net.Addr, timestamp time.
} }
// encodeAndSendMsg is used to combine the encoding and sending steps // encodeAndSendMsg is used to combine the encoding and sending steps
func (m *Memberlist) encodeAndSendMsg(addr string, msgType messageType, msg interface{}) error { func (m *Memberlist) encodeAndSendMsg(a Address, msgType messageType, msg interface{}) error {
out, err := encode(msgType, msg) out, err := encode(msgType, msg)
if err != nil { if err != nil {
return err return err
} }
if err := m.sendMsg(addr, out.Bytes()); err != nil { if err := m.sendMsg(a, out.Bytes()); err != nil {
return err return err
} }
return nil return nil
@@ -628,7 +717,7 @@ func (m *Memberlist) encodeAndSendMsg(addr string, msgType messageType, msg inte
// sendMsg is used to send a message via packet to another host. It will // sendMsg is used to send a message via packet to another host. It will
// opportunistically create a compoundMsg and piggy back other broadcasts. // opportunistically create a compoundMsg and piggy back other broadcasts.
func (m *Memberlist) sendMsg(addr string, msg []byte) error { func (m *Memberlist) sendMsg(a Address, msg []byte) error {
// Check if we can piggy back any messages // Check if we can piggy back any messages
bytesAvail := m.config.UDPBufferSize - len(msg) - compoundHeaderOverhead bytesAvail := m.config.UDPBufferSize - len(msg) - compoundHeaderOverhead
if m.config.EncryptionEnabled() && m.config.GossipVerifyOutgoing { if m.config.EncryptionEnabled() && m.config.GossipVerifyOutgoing {
@@ -638,7 +727,7 @@ func (m *Memberlist) sendMsg(addr string, msg []byte) error {
// Fast path if nothing to piggypack // Fast path if nothing to piggypack
if len(extra) == 0 { if len(extra) == 0 {
return m.rawSendMsgPacket(addr, nil, msg) return m.rawSendMsgPacket(a, nil, msg)
} }
// Join all the messages // Join all the messages
@@ -650,12 +739,16 @@ func (m *Memberlist) sendMsg(addr string, msg []byte) error {
compound := makeCompoundMessage(msgs) compound := makeCompoundMessage(msgs)
// Send the message // Send the message
return m.rawSendMsgPacket(addr, nil, compound.Bytes()) return m.rawSendMsgPacket(a, nil, compound.Bytes())
} }
// rawSendMsgPacket is used to send message via packet to another host without // rawSendMsgPacket is used to send message via packet to another host without
// modification, other than compression or encryption if enabled. // modification, other than compression or encryption if enabled.
func (m *Memberlist) rawSendMsgPacket(addr string, node *Node, msg []byte) error { func (m *Memberlist) rawSendMsgPacket(a Address, node *Node, msg []byte) error {
if a.Name == "" && m.config.RequireNodeNames {
return errNodeNamesAreRequired
}
// Check if we have compression enabled // Check if we have compression enabled
if m.config.EnableCompression { if m.config.EnableCompression {
buf, err := compressPayload(msg) buf, err := compressPayload(msg)
@@ -669,11 +762,12 @@ func (m *Memberlist) rawSendMsgPacket(addr string, node *Node, msg []byte) error
} }
} }
// Try to look up the destination node // Try to look up the destination node. Note this will only work if the
// bare ip address is used as the node name, which is not guaranteed.
if node == nil { if node == nil {
toAddr, _, err := net.SplitHostPort(addr) toAddr, _, err := net.SplitHostPort(a.Addr)
if err != nil { if err != nil {
m.logger.Printf("[ERR] memberlist: Failed to parse address %q: %v", addr, err) m.logger.Printf("[ERR] memberlist: Failed to parse address %q: %v", a.Addr, err)
return err return err
} }
m.nodeLock.RLock() m.nodeLock.RLock()
@@ -708,14 +802,14 @@ func (m *Memberlist) rawSendMsgPacket(addr string, node *Node, msg []byte) error
} }
metrics.IncrCounter([]string{"memberlist", "udp", "sent"}, float32(len(msg))) metrics.IncrCounter([]string{"memberlist", "udp", "sent"}, float32(len(msg)))
_, err := m.transport.WriteTo(msg, addr) _, err := m.transport.WriteToAddress(msg, a)
return err return err
} }
// rawSendMsgStream is used to stream a message to another host without // rawSendMsgStream is used to stream a message to another host without
// modification, other than applying compression and encryption if enabled. // modification, other than applying compression and encryption if enabled.
func (m *Memberlist) rawSendMsgStream(conn net.Conn, sendBuf []byte) error { func (m *Memberlist) rawSendMsgStream(conn net.Conn, sendBuf []byte) error {
// Check if compresion is enabled // Check if compression is enabled
if m.config.EnableCompression { if m.config.EnableCompression {
compBuf, err := compressPayload(sendBuf) compBuf, err := compressPayload(sendBuf)
if err != nil { if err != nil {
@@ -748,8 +842,12 @@ func (m *Memberlist) rawSendMsgStream(conn net.Conn, sendBuf []byte) error {
} }
// sendUserMsg is used to stream a user message to another host. // sendUserMsg is used to stream a user message to another host.
func (m *Memberlist) sendUserMsg(addr string, sendBuf []byte) error { func (m *Memberlist) sendUserMsg(a Address, sendBuf []byte) error {
conn, err := m.transport.DialTimeout(addr, m.config.TCPTimeout) if a.Name == "" && m.config.RequireNodeNames {
return errNodeNamesAreRequired
}
conn, err := m.transport.DialAddressTimeout(a, m.config.TCPTimeout)
if err != nil { if err != nil {
return err return err
} }
@@ -774,14 +872,18 @@ func (m *Memberlist) sendUserMsg(addr string, sendBuf []byte) error {
// sendAndReceiveState is used to initiate a push/pull over a stream with a // sendAndReceiveState is used to initiate a push/pull over a stream with a
// remote host. // remote host.
func (m *Memberlist) sendAndReceiveState(addr string, join bool) ([]pushNodeState, []byte, error) { func (m *Memberlist) sendAndReceiveState(a Address, join bool) ([]pushNodeState, []byte, error) {
if a.Name == "" && m.config.RequireNodeNames {
return nil, nil, errNodeNamesAreRequired
}
// Attempt to connect // Attempt to connect
conn, err := m.transport.DialTimeout(addr, m.config.TCPTimeout) conn, err := m.transport.DialAddressTimeout(a, m.config.TCPTimeout)
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
defer conn.Close() defer conn.Close()
m.logger.Printf("[DEBUG] memberlist: Initiating push/pull sync with: %s", conn.RemoteAddr()) m.logger.Printf("[DEBUG] memberlist: Initiating push/pull sync with: %s %s", a.Name, conn.RemoteAddr())
metrics.IncrCounter([]string{"memberlist", "tcp", "connect"}, 1) metrics.IncrCounter([]string{"memberlist", "tcp", "connect"}, 1)
// Send our state // Send our state
@@ -1046,16 +1148,17 @@ func (m *Memberlist) mergeRemoteState(join bool, remoteNodes []pushNodeState, us
nodes := make([]*Node, len(remoteNodes)) nodes := make([]*Node, len(remoteNodes))
for idx, n := range remoteNodes { for idx, n := range remoteNodes {
nodes[idx] = &Node{ nodes[idx] = &Node{
Name: n.Name, Name: n.Name,
Addr: n.Addr, Addr: n.Addr,
Port: n.Port, Port: n.Port,
Meta: n.Meta, Meta: n.Meta,
PMin: n.Vsn[0], State: n.State,
PMax: n.Vsn[1], PMin: n.Vsn[0],
PCur: n.Vsn[2], PMax: n.Vsn[1],
DMin: n.Vsn[3], PCur: n.Vsn[2],
DMax: n.Vsn[4], DMin: n.Vsn[3],
DCur: n.Vsn[5], DMax: n.Vsn[4],
DCur: n.Vsn[5],
} }
} }
if err := m.config.Merge.NotifyMerge(nodes); err != nil { if err := m.config.Merge.NotifyMerge(nodes); err != nil {
@@ -1108,8 +1211,12 @@ func (m *Memberlist) readUserMsg(bufConn io.Reader, dec *codec.Decoder) error {
// a ping, and waits for an ack. All of this is done as a series of blocking // a ping, and waits for an ack. All of this is done as a series of blocking
// operations, given the deadline. The bool return parameter is true if we // operations, given the deadline. The bool return parameter is true if we
// we able to round trip a ping to the other node. // we able to round trip a ping to the other node.
func (m *Memberlist) sendPingAndWaitForAck(addr string, ping ping, deadline time.Time) (bool, error) { func (m *Memberlist) sendPingAndWaitForAck(a Address, ping ping, deadline time.Time) (bool, error) {
conn, err := m.transport.DialTimeout(addr, deadline.Sub(time.Now())) if a.Name == "" && m.config.RequireNodeNames {
return false, errNodeNamesAreRequired
}
conn, err := m.transport.DialAddressTimeout(a, deadline.Sub(time.Now()))
if err != nil { if err != nil {
// If the node is actually dead we expect this to fail, so we // If the node is actually dead we expect this to fail, so we
// shouldn't spam the logs with it. After this point, errors // shouldn't spam the logs with it. After this point, errors

54
vendor/github.com/hashicorp/memberlist/net_transport.go сгенерированный поставляемый
Просмотреть файл

@@ -1,7 +1,9 @@
package memberlist package memberlist
import ( import (
"bytes"
"fmt" "fmt"
"io"
"log" "log"
"net" "net"
"sync" "sync"
@@ -48,6 +50,8 @@ type NetTransport struct {
shutdown int32 shutdown int32
} }
var _ NodeAwareTransport = (*NetTransport)(nil)
// NewNetTransport returns a net transport with the given configuration. On // NewNetTransport returns a net transport with the given configuration. On
// success all the network listeners will be created and listening. // success all the network listeners will be created and listening.
func NewNetTransport(config *NetTransportConfig) (*NetTransport, error) { func NewNetTransport(config *NetTransportConfig) (*NetTransport, error) {
@@ -170,6 +174,14 @@ func (t *NetTransport) FinalAdvertiseAddr(ip string, port int) (net.IP, int, err
// See Transport. // See Transport.
func (t *NetTransport) WriteTo(b []byte, addr string) (time.Time, error) { func (t *NetTransport) WriteTo(b []byte, addr string) (time.Time, error) {
a := Address{Addr: addr, Name: ""}
return t.WriteToAddress(b, a)
}
// See NodeAwareTransport.
func (t *NetTransport) WriteToAddress(b []byte, a Address) (time.Time, error) {
addr := a.Addr
udpAddr, err := net.ResolveUDPAddr("udp", addr) udpAddr, err := net.ResolveUDPAddr("udp", addr)
if err != nil { if err != nil {
return time.Time{}, err return time.Time{}, err
@@ -188,8 +200,44 @@ func (t *NetTransport) PacketCh() <-chan *Packet {
return t.packetCh return t.packetCh
} }
// See IngestionAwareTransport.
func (t *NetTransport) IngestPacket(conn net.Conn, addr net.Addr, now time.Time, shouldClose bool) error {
if shouldClose {
defer conn.Close()
}
// Copy everything from the stream into packet buffer.
var buf bytes.Buffer
if _, err := io.Copy(&buf, conn); err != nil {
return fmt.Errorf("failed to read packet: %v", err)
}
// Check the length - it needs to have at least one byte to be a proper
// message. This is checked elsewhere for writes coming in directly from
// the UDP socket.
if n := buf.Len(); n < 1 {
return fmt.Errorf("packet too short (%d bytes) %s", n, LogAddress(addr))
}
// Inject the packet.
t.packetCh <- &Packet{
Buf: buf.Bytes(),
From: addr,
Timestamp: now,
}
return nil
}
// See Transport. // See Transport.
func (t *NetTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) { func (t *NetTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error) {
a := Address{Addr: addr, Name: ""}
return t.DialAddressTimeout(a, timeout)
}
// See NodeAwareTransport.
func (t *NetTransport) DialAddressTimeout(a Address, timeout time.Duration) (net.Conn, error) {
addr := a.Addr
dialer := net.Dialer{Timeout: timeout} dialer := net.Dialer{Timeout: timeout}
return dialer.Dial("tcp", addr) return dialer.Dial("tcp", addr)
} }
@@ -199,6 +247,12 @@ func (t *NetTransport) StreamCh() <-chan net.Conn {
return t.streamCh return t.streamCh
} }
// See IngestionAwareTransport.
func (t *NetTransport) IngestStream(conn net.Conn) error {
t.streamCh <- conn
return nil
}
// See Transport. // See Transport.
func (t *NetTransport) Shutdown() error { func (t *NetTransport) Shutdown() error {
// This will avoid log spam about errors when we shut down. // This will avoid log spam about errors when we shut down.

5
vendor/github.com/hashicorp/memberlist/security.go сгенерированный поставляемый
Просмотреть файл

@@ -106,7 +106,10 @@ func encryptPayload(vsn encryptionVersion, key []byte, msg []byte, data []byte,
dst.WriteByte(byte(vsn)) dst.WriteByte(byte(vsn))
// Add a random nonce // Add a random nonce
io.CopyN(dst, rand.Reader, nonceSize) _, err = io.CopyN(dst, rand.Reader, nonceSize)
if err != nil {
return err
}
afterNonce := dst.Len() afterNonce := dst.Len()
// Ensure we are correctly padded (only version 0) // Ensure we are correctly padded (only version 0)

173
vendor/github.com/hashicorp/memberlist/state.go сгенерированный поставляемый
Просмотреть файл

@@ -13,26 +13,28 @@ import (
metrics "github.com/armon/go-metrics" metrics "github.com/armon/go-metrics"
) )
type nodeStateType int type NodeStateType int
const ( const (
stateAlive nodeStateType = iota StateAlive NodeStateType = iota
stateSuspect StateSuspect
stateDead StateDead
StateLeft
) )
// Node represents a node in the cluster. // Node represents a node in the cluster.
type Node struct { type Node struct {
Name string Name string
Addr net.IP Addr net.IP
Port uint16 Port uint16
Meta []byte // Metadata from the delegate for this node. Meta []byte // Metadata from the delegate for this node.
PMin uint8 // Minimum protocol version this understands State NodeStateType // State of the node.
PMax uint8 // Maximum protocol version this understands PMin uint8 // Minimum protocol version this understands
PCur uint8 // Current version node is speaking PMax uint8 // Maximum protocol version this understands
DMin uint8 // Min protocol version for the delegate to understand PCur uint8 // Current version node is speaking
DMax uint8 // Max protocol version for the delegate to understand DMin uint8 // Min protocol version for the delegate to understand
DCur uint8 // Current version delegate is speaking DMax uint8 // Max protocol version for the delegate to understand
DCur uint8 // Current version delegate is speaking
} }
// Address returns the host:port form of a node's address, suitable for use // Address returns the host:port form of a node's address, suitable for use
@@ -41,6 +43,15 @@ func (n *Node) Address() string {
return joinHostPort(n.Addr.String(), n.Port) return joinHostPort(n.Addr.String(), n.Port)
} }
// FullAddress returns the node name and host:port form of a node's address,
// suitable for use with a transport.
func (n *Node) FullAddress() Address {
return Address{
Addr: joinHostPort(n.Addr.String(), n.Port),
Name: n.Name,
}
}
// String returns the node name // String returns the node name
func (n *Node) String() string { func (n *Node) String() string {
return n.Name return n.Name
@@ -50,7 +61,7 @@ func (n *Node) String() string {
type nodeState struct { type nodeState struct {
Node Node
Incarnation uint32 // Last known incarnation number Incarnation uint32 // Last known incarnation number
State nodeStateType // Current state State NodeStateType // Current state
StateChange time.Time // Time last state change happened StateChange time.Time // Time last state change happened
} }
@@ -60,6 +71,16 @@ func (n *nodeState) Address() string {
return n.Node.Address() return n.Node.Address()
} }
// FullAddress returns the node name and host:port form of a node's address,
// suitable for use with a transport.
func (n *nodeState) FullAddress() Address {
return n.Node.FullAddress()
}
func (n *nodeState) DeadOrLeft() bool {
return n.State == StateDead || n.State == StateLeft
}
// ackHandler is used to register handlers for incoming acks and nacks. // ackHandler is used to register handlers for incoming acks and nacks.
type ackHandler struct { type ackHandler struct {
ackFn func([]byte, time.Time) ackFn func([]byte, time.Time)
@@ -218,7 +239,7 @@ START:
node = *m.nodes[m.probeIndex] node = *m.nodes[m.probeIndex]
if node.Name == m.config.Name { if node.Name == m.config.Name {
skip = true skip = true
} else if node.State == stateDead { } else if node.DeadOrLeft() {
skip = true skip = true
} }
@@ -271,7 +292,14 @@ func (m *Memberlist) probeNode(node *nodeState) {
} }
// Prepare a ping message and setup an ack handler. // Prepare a ping message and setup an ack handler.
ping := ping{SeqNo: m.nextSeqNo(), Node: node.Name} selfAddr, selfPort := m.getAdvertise()
ping := ping{
SeqNo: m.nextSeqNo(),
Node: node.Name,
SourceAddr: selfAddr,
SourcePort: selfPort,
SourceNode: m.config.Name,
}
ackCh := make(chan ackMessage, m.config.IndirectChecks+1) ackCh := make(chan ackMessage, m.config.IndirectChecks+1)
nackCh := make(chan struct{}, m.config.IndirectChecks+1) nackCh := make(chan struct{}, m.config.IndirectChecks+1)
m.setProbeChannels(ping.SeqNo, ackCh, nackCh, probeInterval) m.setProbeChannels(ping.SeqNo, ackCh, nackCh, probeInterval)
@@ -294,8 +322,8 @@ func (m *Memberlist) probeNode(node *nodeState) {
defer func() { defer func() {
m.awareness.ApplyDelta(awarenessDelta) m.awareness.ApplyDelta(awarenessDelta)
}() }()
if node.State == stateAlive { if node.State == StateAlive {
if err := m.encodeAndSendMsg(addr, pingMsg, &ping); err != nil { if err := m.encodeAndSendMsg(node.FullAddress(), pingMsg, &ping); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send ping: %s", err) m.logger.Printf("[ERR] memberlist: Failed to send ping: %s", err)
if failedRemote(err) { if failedRemote(err) {
goto HANDLE_REMOTE_FAILURE goto HANDLE_REMOTE_FAILURE
@@ -320,7 +348,7 @@ func (m *Memberlist) probeNode(node *nodeState) {
} }
compound := makeCompoundMessage(msgs) compound := makeCompoundMessage(msgs)
if err := m.rawSendMsgPacket(addr, &node.Node, compound.Bytes()); err != nil { if err := m.rawSendMsgPacket(node.FullAddress(), &node.Node, compound.Bytes()); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send compound ping and suspect message to %s: %s", addr, err) m.logger.Printf("[ERR] memberlist: Failed to send compound ping and suspect message to %s: %s", addr, err)
if failedRemote(err) { if failedRemote(err) {
goto HANDLE_REMOTE_FAILURE goto HANDLE_REMOTE_FAILURE
@@ -369,13 +397,22 @@ HANDLE_REMOTE_FAILURE:
kNodes := kRandomNodes(m.config.IndirectChecks, m.nodes, func(n *nodeState) bool { kNodes := kRandomNodes(m.config.IndirectChecks, m.nodes, func(n *nodeState) bool {
return n.Name == m.config.Name || return n.Name == m.config.Name ||
n.Name == node.Name || n.Name == node.Name ||
n.State != stateAlive n.State != StateAlive
}) })
m.nodeLock.RUnlock() m.nodeLock.RUnlock()
// Attempt an indirect ping. // Attempt an indirect ping.
expectedNacks := 0 expectedNacks := 0
ind := indirectPingReq{SeqNo: ping.SeqNo, Target: node.Addr, Port: node.Port, Node: node.Name} selfAddr, selfPort = m.getAdvertise()
ind := indirectPingReq{
SeqNo: ping.SeqNo,
Target: node.Addr,
Port: node.Port,
Node: node.Name,
SourceAddr: selfAddr,
SourcePort: selfPort,
SourceNode: m.config.Name,
}
for _, peer := range kNodes { for _, peer := range kNodes {
// We only expect nack to be sent from peers who understand // We only expect nack to be sent from peers who understand
// version 4 of the protocol. // version 4 of the protocol.
@@ -383,7 +420,7 @@ HANDLE_REMOTE_FAILURE:
expectedNacks++ expectedNacks++
} }
if err := m.encodeAndSendMsg(peer.Address(), indirectPingMsg, &ind); err != nil { if err := m.encodeAndSendMsg(peer.FullAddress(), indirectPingMsg, &ind); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send indirect ping: %s", err) m.logger.Printf("[ERR] memberlist: Failed to send indirect ping: %s", err)
} }
} }
@@ -399,10 +436,13 @@ HANDLE_REMOTE_FAILURE:
// which protocol version we are speaking. That's why we've included a // which protocol version we are speaking. That's why we've included a
// config option to turn this off if desired. // config option to turn this off if desired.
fallbackCh := make(chan bool, 1) fallbackCh := make(chan bool, 1)
if (!m.config.DisableTcpPings) && (node.PMax >= 3) {
disableTcpPings := m.config.DisableTcpPings ||
(m.config.DisableTcpPingsForNode != nil && m.config.DisableTcpPingsForNode(node.Name))
if (!disableTcpPings) && (node.PMax >= 3) {
go func() { go func() {
defer close(fallbackCh) defer close(fallbackCh)
didContact, err := m.sendPingAndWaitForAck(node.Address(), ping, deadline) didContact, err := m.sendPingAndWaitForAck(node.FullAddress(), ping, deadline)
if err != nil { if err != nil {
m.logger.Printf("[ERR] memberlist: Failed fallback ping: %s", err) m.logger.Printf("[ERR] memberlist: Failed fallback ping: %s", err)
} else { } else {
@@ -459,12 +499,21 @@ HANDLE_REMOTE_FAILURE:
// Ping initiates a ping to the node with the specified name. // Ping initiates a ping to the node with the specified name.
func (m *Memberlist) Ping(node string, addr net.Addr) (time.Duration, error) { func (m *Memberlist) Ping(node string, addr net.Addr) (time.Duration, error) {
// Prepare a ping message and setup an ack handler. // Prepare a ping message and setup an ack handler.
ping := ping{SeqNo: m.nextSeqNo(), Node: node} selfAddr, selfPort := m.getAdvertise()
ping := ping{
SeqNo: m.nextSeqNo(),
Node: node,
SourceAddr: selfAddr,
SourcePort: selfPort,
SourceNode: m.config.Name,
}
ackCh := make(chan ackMessage, m.config.IndirectChecks+1) ackCh := make(chan ackMessage, m.config.IndirectChecks+1)
m.setProbeChannels(ping.SeqNo, ackCh, nil, m.config.ProbeInterval) m.setProbeChannels(ping.SeqNo, ackCh, nil, m.config.ProbeInterval)
a := Address{Addr: addr.String(), Name: node}
// Send a ping to the node. // Send a ping to the node.
if err := m.encodeAndSendMsg(addr.String(), pingMsg, &ping); err != nil { if err := m.encodeAndSendMsg(a, pingMsg, &ping); err != nil {
return 0, err return 0, err
} }
@@ -525,10 +574,10 @@ func (m *Memberlist) gossip() {
} }
switch n.State { switch n.State {
case stateAlive, stateSuspect: case StateAlive, StateSuspect:
return false return false
case stateDead: case StateDead:
return time.Since(n.StateChange) > m.config.GossipToTheDeadTime return time.Since(n.StateChange) > m.config.GossipToTheDeadTime
default: default:
@@ -553,13 +602,13 @@ func (m *Memberlist) gossip() {
addr := node.Address() addr := node.Address()
if len(msgs) == 1 { if len(msgs) == 1 {
// Send single message as is // Send single message as is
if err := m.rawSendMsgPacket(addr, &node.Node, msgs[0]); err != nil { if err := m.rawSendMsgPacket(node.FullAddress(), &node.Node, msgs[0]); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err) m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err)
} }
} else { } else {
// Otherwise create and send a compound message // Otherwise create and send a compound message
compound := makeCompoundMessage(msgs) compound := makeCompoundMessage(msgs)
if err := m.rawSendMsgPacket(addr, &node.Node, compound.Bytes()); err != nil { if err := m.rawSendMsgPacket(node.FullAddress(), &node.Node, compound.Bytes()); err != nil {
m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err) m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err)
} }
} }
@@ -575,7 +624,7 @@ func (m *Memberlist) pushPull() {
m.nodeLock.RLock() m.nodeLock.RLock()
nodes := kRandomNodes(1, m.nodes, func(n *nodeState) bool { nodes := kRandomNodes(1, m.nodes, func(n *nodeState) bool {
return n.Name == m.config.Name || return n.Name == m.config.Name ||
n.State != stateAlive n.State != StateAlive
}) })
m.nodeLock.RUnlock() m.nodeLock.RUnlock()
@@ -586,17 +635,17 @@ func (m *Memberlist) pushPull() {
node := nodes[0] node := nodes[0]
// Attempt a push pull // Attempt a push pull
if err := m.pushPullNode(node.Address(), false); err != nil { if err := m.pushPullNode(node.FullAddress(), false); err != nil {
m.logger.Printf("[ERR] memberlist: Push/Pull with %s failed: %s", node.Name, err) m.logger.Printf("[ERR] memberlist: Push/Pull with %s failed: %s", node.Name, err)
} }
} }
// pushPullNode does a complete state exchange with a specific node. // pushPullNode does a complete state exchange with a specific node.
func (m *Memberlist) pushPullNode(addr string, join bool) error { func (m *Memberlist) pushPullNode(a Address, join bool) error {
defer metrics.MeasureSince([]string{"memberlist", "pushPullNode"}, time.Now()) defer metrics.MeasureSince([]string{"memberlist", "pushPullNode"}, time.Now())
// Attempt to send and receive with the node // Attempt to send and receive with the node
remote, userState, err := m.sendAndReceiveState(addr, join) remote, userState, err := m.sendAndReceiveState(a, join)
if err != nil { if err != nil {
return err return err
} }
@@ -633,7 +682,7 @@ func (m *Memberlist) verifyProtocol(remote []pushNodeState) error {
for _, rn := range remote { for _, rn := range remote {
// If the node isn't alive, then skip it // If the node isn't alive, then skip it
if rn.State != stateAlive { if rn.State != StateAlive {
continue continue
} }
@@ -662,7 +711,7 @@ func (m *Memberlist) verifyProtocol(remote []pushNodeState) error {
for _, n := range m.nodes { for _, n := range m.nodes {
// Ignore non-alive nodes // Ignore non-alive nodes
if n.State != stateAlive { if n.State != StateAlive {
continue continue
} }
@@ -921,6 +970,11 @@ func (m *Memberlist) aliveNode(a *alive, notify chan struct{}, bootstrap bool) {
// store this node in our node map. // store this node in our node map.
var updatesNode bool var updatesNode bool
if !ok { if !ok {
errCon := m.config.IPAllowed(a.Addr)
if errCon != nil {
m.logger.Printf("[WARN] memberlist: Rejected node %s (%v): %s", a.Node, net.IP(a.Addr), errCon)
return
}
state = &nodeState{ state = &nodeState{
Node: Node{ Node: Node{
Name: a.Node, Name: a.Node,
@@ -928,7 +982,7 @@ func (m *Memberlist) aliveNode(a *alive, notify chan struct{}, bootstrap bool) {
Port: a.Port, Port: a.Port,
Meta: a.Meta, Meta: a.Meta,
}, },
State: stateDead, State: StateDead,
} }
if len(a.Vsn) > 5 { if len(a.Vsn) > 5 {
state.PMin = a.Vsn[0] state.PMin = a.Vsn[0]
@@ -958,13 +1012,18 @@ func (m *Memberlist) aliveNode(a *alive, notify chan struct{}, bootstrap bool) {
} else { } else {
// Check if this address is different than the existing node unless the old node is dead. // Check if this address is different than the existing node unless the old node is dead.
if !bytes.Equal([]byte(state.Addr), a.Addr) || state.Port != a.Port { if !bytes.Equal([]byte(state.Addr), a.Addr) || state.Port != a.Port {
errCon := m.config.IPAllowed(a.Addr)
if errCon != nil {
m.logger.Printf("[WARN] memberlist: Rejected IP update from %v to %v for node %s: %s", a.Node, state.Addr, net.IP(a.Addr), errCon)
return
}
// If DeadNodeReclaimTime is configured, check if enough time has elapsed since the node died. // If DeadNodeReclaimTime is configured, check if enough time has elapsed since the node died.
canReclaim := (m.config.DeadNodeReclaimTime > 0 && canReclaim := (m.config.DeadNodeReclaimTime > 0 &&
time.Since(state.StateChange) > m.config.DeadNodeReclaimTime) time.Since(state.StateChange) > m.config.DeadNodeReclaimTime)
// Allow the address to be updated if a dead node is being replaced. // Allow the address to be updated if a dead node is being replaced.
if state.State == stateDead && canReclaim { if state.State == StateLeft || (state.State == StateDead && canReclaim) {
m.logger.Printf("[INFO] memberlist: Updating address for failed node %s from %v:%d to %v:%d", m.logger.Printf("[INFO] memberlist: Updating address for left or failed node %s from %v:%d to %v:%d",
state.Name, state.Addr, state.Port, net.IP(a.Addr), a.Port) state.Name, state.Addr, state.Port, net.IP(a.Addr), a.Port)
updatesNode = true updatesNode = true
} else { } else {
@@ -1048,8 +1107,8 @@ func (m *Memberlist) aliveNode(a *alive, notify chan struct{}, bootstrap bool) {
state.Meta = a.Meta state.Meta = a.Meta
state.Addr = a.Addr state.Addr = a.Addr
state.Port = a.Port state.Port = a.Port
if state.State != stateAlive { if state.State != StateAlive {
state.State = stateAlive state.State = StateAlive
state.StateChange = time.Now() state.StateChange = time.Now()
} }
} }
@@ -1059,8 +1118,8 @@ func (m *Memberlist) aliveNode(a *alive, notify chan struct{}, bootstrap bool) {
// Notify the delegate of any relevant updates // Notify the delegate of any relevant updates
if m.config.Events != nil { if m.config.Events != nil {
if oldState == stateDead { if oldState == StateDead || oldState == StateLeft {
// if Dead -> Alive, notify of join // if Dead/Left -> Alive, notify of join
m.config.Events.NotifyJoin(&state.Node) m.config.Events.NotifyJoin(&state.Node)
} else if !bytes.Equal(oldMeta, state.Meta) { } else if !bytes.Equal(oldMeta, state.Meta) {
@@ -1099,7 +1158,7 @@ func (m *Memberlist) suspectNode(s *suspect) {
} }
// Ignore non-alive nodes // Ignore non-alive nodes
if state.State != stateAlive { if state.State != StateAlive {
return return
} }
@@ -1117,7 +1176,7 @@ func (m *Memberlist) suspectNode(s *suspect) {
// Update the state // Update the state
state.Incarnation = s.Incarnation state.Incarnation = s.Incarnation
state.State = stateSuspect state.State = StateSuspect
changeTime := time.Now() changeTime := time.Now()
state.StateChange = changeTime state.StateChange = changeTime
@@ -1141,7 +1200,7 @@ func (m *Memberlist) suspectNode(s *suspect) {
fn := func(numConfirmations int) { fn := func(numConfirmations int) {
m.nodeLock.Lock() m.nodeLock.Lock()
state, ok := m.nodeMap[s.Node] state, ok := m.nodeMap[s.Node]
timeout := ok && state.State == stateSuspect && state.StateChange == changeTime timeout := ok && state.State == StateSuspect && state.StateChange == changeTime
m.nodeLock.Unlock() m.nodeLock.Unlock()
if timeout { if timeout {
@@ -1179,7 +1238,7 @@ func (m *Memberlist) deadNode(d *dead) {
delete(m.nodeTimers, d.Node) delete(m.nodeTimers, d.Node)
// Ignore if node is already dead // Ignore if node is already dead
if state.State == stateDead { if state.DeadOrLeft() {
return return
} }
@@ -1203,7 +1262,14 @@ func (m *Memberlist) deadNode(d *dead) {
// Update the state // Update the state
state.Incarnation = d.Incarnation state.Incarnation = d.Incarnation
state.State = stateDead
// If the dead message was send by the node itself, mark it is left
// instead of dead.
if d.Node == d.From {
state.State = StateLeft
} else {
state.State = StateDead
}
state.StateChange = time.Now() state.StateChange = time.Now()
// Notify of death // Notify of death
@@ -1217,7 +1283,7 @@ func (m *Memberlist) deadNode(d *dead) {
func (m *Memberlist) mergeState(remote []pushNodeState) { func (m *Memberlist) mergeState(remote []pushNodeState) {
for _, r := range remote { for _, r := range remote {
switch r.State { switch r.State {
case stateAlive: case StateAlive:
a := alive{ a := alive{
Incarnation: r.Incarnation, Incarnation: r.Incarnation,
Node: r.Name, Node: r.Name,
@@ -1228,11 +1294,14 @@ func (m *Memberlist) mergeState(remote []pushNodeState) {
} }
m.aliveNode(&a, nil, false) m.aliveNode(&a, nil, false)
case stateDead: case StateLeft:
d := dead{Incarnation: r.Incarnation, Node: r.Name, From: r.Name}
m.deadNode(&d)
case StateDead:
// If the remote node believes a node is dead, we prefer to // If the remote node believes a node is dead, we prefer to
// suspect that node instead of declaring it dead instantly // suspect that node instead of declaring it dead instantly
fallthrough fallthrough
case stateSuspect: case StateSuspect:
s := suspect{Incarnation: r.Incarnation, Node: r.Name, From: m.config.Name} s := suspect{Incarnation: r.Incarnation, Node: r.Name, From: m.config.Name}
m.suspectNode(&s) m.suspectNode(&s)
} }

62
vendor/github.com/hashicorp/memberlist/transport.go сгенерированный поставляемый
Просмотреть файл

@@ -1,6 +1,7 @@
package memberlist package memberlist
import ( import (
"fmt"
"net" "net"
"time" "time"
) )
@@ -63,3 +64,64 @@ type Transport interface {
// transport a chance to clean up any listeners. // transport a chance to clean up any listeners.
Shutdown() error Shutdown() error
} }
type Address struct {
// Addr is a network address as a string, similar to Dial. This usually is
// in the form of "host:port". This is required.
Addr string
// Name is the name of the node being addressed. This is optional but
// transports may require it.
Name string
}
func (a *Address) String() string {
if a.Name != "" {
return fmt.Sprintf("%s (%s)", a.Name, a.Addr)
}
return a.Addr
}
type IngestionAwareTransport interface {
Transport
// IngestPacket pulls a single packet off the conn, and only closes it if shouldClose is true.
IngestPacket(conn net.Conn, addr net.Addr, now time.Time, shouldClose bool) error
// IngestStream hands off the conn to the transport and doesn't close it.
IngestStream(conn net.Conn) error
}
type NodeAwareTransport interface {
IngestionAwareTransport
WriteToAddress(b []byte, addr Address) (time.Time, error)
DialAddressTimeout(addr Address, timeout time.Duration) (net.Conn, error)
}
type shimNodeAwareTransport struct {
Transport
}
var _ NodeAwareTransport = (*shimNodeAwareTransport)(nil)
func (t *shimNodeAwareTransport) IngestPacket(conn net.Conn, addr net.Addr, now time.Time, shouldClose bool) error {
iat, ok := t.Transport.(IngestionAwareTransport)
if !ok {
panic("shimNodeAwareTransport does not support IngestPacket")
}
return iat.IngestPacket(conn, addr, now, shouldClose)
}
func (t *shimNodeAwareTransport) IngestStream(conn net.Conn) error {
iat, ok := t.Transport.(IngestionAwareTransport)
if !ok {
panic("shimNodeAwareTransport does not support IngestStream")
}
return iat.IngestStream(conn)
}
func (t *shimNodeAwareTransport) WriteToAddress(b []byte, addr Address) (time.Time, error) {
return t.WriteTo(b, addr.Addr)
}
func (t *shimNodeAwareTransport) DialAddressTimeout(addr Address, timeout time.Duration) (net.Conn, error) {
return t.DialTimeout(addr.Addr, timeout)
}

2
vendor/github.com/hashicorp/memberlist/util.go сгенерированный поставляемый
Просмотреть файл

@@ -102,7 +102,7 @@ func moveDeadNodes(nodes []*nodeState, gossipToTheDeadTime time.Duration) int {
numDead := 0 numDead := 0
n := len(nodes) n := len(nodes)
for i := 0; i < n-numDead; i++ { for i := 0; i < n-numDead; i++ {
if nodes[i].State != stateDead { if nodes[i].State != StateDead {
continue continue
} }

2
vendor/golang.org/x/net/http2/client_conn_pool.go сгенерированный поставляемый
Просмотреть файл

@@ -107,6 +107,7 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
// dialCall is an in-flight Transport dial call to a host. // dialCall is an in-flight Transport dial call to a host.
type dialCall struct { type dialCall struct {
_ incomparable
p *clientConnPool p *clientConnPool
done chan struct{} // closed when done done chan struct{} // closed when done
res *ClientConn // valid after done is closed res *ClientConn // valid after done is closed
@@ -180,6 +181,7 @@ func (p *clientConnPool) addConnIfNeeded(key string, t *Transport, c *tls.Conn)
} }
type addConnCall struct { type addConnCall struct {
_ incomparable
p *clientConnPool p *clientConnPool
done chan struct{} // closed when done done chan struct{} // closed when done
err error err error

2
vendor/golang.org/x/net/http2/flow.go сгенерированный поставляемый
Просмотреть файл

@@ -8,6 +8,8 @@ package http2
// flow is the flow control window's size. // flow is the flow control window's size.
type flow struct { type flow struct {
_ incomparable
// n is the number of DATA bytes we're allowed to send. // n is the number of DATA bytes we're allowed to send.
// A flow is kept both on a conn and a per-stream. // A flow is kept both on a conn and a per-stream.
n int32 n int32

7
vendor/golang.org/x/net/http2/hpack/huffman.go сгенерированный поставляемый
Просмотреть файл

@@ -105,7 +105,14 @@ func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error {
return nil return nil
} }
// incomparable is a zero-width, non-comparable type. Adding it to a struct
// makes that struct also non-comparable, and generally doesn't add
// any size (as long as it's first).
type incomparable [0]func()
type node struct { type node struct {
_ incomparable
// children is non-nil for internal nodes // children is non-nil for internal nodes
children *[256]*node children *[256]*node

7
vendor/golang.org/x/net/http2/http2.go сгенерированный поставляемый
Просмотреть файл

@@ -241,6 +241,7 @@ func (cw closeWaiter) Wait() {
// Its buffered writer is lazily allocated as needed, to minimize // Its buffered writer is lazily allocated as needed, to minimize
// idle memory usage with many connections. // idle memory usage with many connections.
type bufferedWriter struct { type bufferedWriter struct {
_ incomparable
w io.Writer // immutable w io.Writer // immutable
bw *bufio.Writer // non-nil when data is buffered bw *bufio.Writer // non-nil when data is buffered
} }
@@ -313,6 +314,7 @@ func bodyAllowedForStatus(status int) bool {
} }
type httpError struct { type httpError struct {
_ incomparable
msg string msg string
timeout bool timeout bool
} }
@@ -376,3 +378,8 @@ func (s *sorter) SortStrings(ss []string) {
func validPseudoPath(v string) bool { func validPseudoPath(v string) bool {
return (len(v) > 0 && v[0] == '/') || v == "*" return (len(v) > 0 && v[0] == '/') || v == "*"
} }
// incomparable is a zero-width, non-comparable type. Adding it to a struct
// makes that struct also non-comparable, and generally doesn't add
// any size (as long as it's first).
type incomparable [0]func()

6
vendor/golang.org/x/net/http2/server.go сгенерированный поставляемый
Просмотреть файл

@@ -761,6 +761,7 @@ func (sc *serverConn) readFrames() {
// frameWriteResult is the message passed from writeFrameAsync to the serve goroutine. // frameWriteResult is the message passed from writeFrameAsync to the serve goroutine.
type frameWriteResult struct { type frameWriteResult struct {
_ incomparable
wr FrameWriteRequest // what was written (or attempted) wr FrameWriteRequest // what was written (or attempted)
err error // result of the writeFrame call err error // result of the writeFrame call
} }
@@ -771,7 +772,7 @@ type frameWriteResult struct {
// serverConn. // serverConn.
func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest) { func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest) {
err := wr.write.writeFrame(sc) err := wr.write.writeFrame(sc)
sc.wroteFrameCh <- frameWriteResult{wr, err} sc.wroteFrameCh <- frameWriteResult{wr: wr, err: err}
} }
func (sc *serverConn) closeAllStreamsOnConnClose() { func (sc *serverConn) closeAllStreamsOnConnClose() {
@@ -1161,7 +1162,7 @@ func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) {
if wr.write.staysWithinBuffer(sc.bw.Available()) { if wr.write.staysWithinBuffer(sc.bw.Available()) {
sc.writingFrameAsync = false sc.writingFrameAsync = false
err := wr.write.writeFrame(sc) err := wr.write.writeFrame(sc)
sc.wroteFrame(frameWriteResult{wr, err}) sc.wroteFrame(frameWriteResult{wr: wr, err: err})
} else { } else {
sc.writingFrameAsync = true sc.writingFrameAsync = true
go sc.writeFrameAsync(wr) go sc.writeFrameAsync(wr)
@@ -2275,6 +2276,7 @@ func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) {
// requestBody is the Handler's Request.Body type. // requestBody is the Handler's Request.Body type.
// Read and Close may be called concurrently. // Read and Close may be called concurrently.
type requestBody struct { type requestBody struct {
_ incomparable
stream *stream stream *stream
conn *serverConn conn *serverConn
closed bool // for use by Close only closed bool // for use by Close only

12
vendor/golang.org/x/net/http2/transport.go сгенерированный поставляемый
Просмотреть файл

@@ -916,7 +916,7 @@ func commaSeparatedTrailers(req *http.Request) (string, error) {
k = http.CanonicalHeaderKey(k) k = http.CanonicalHeaderKey(k)
switch k { switch k {
case "Transfer-Encoding", "Trailer", "Content-Length": case "Transfer-Encoding", "Trailer", "Content-Length":
return "", &badStringError{"invalid Trailer key", k} return "", fmt.Errorf("invalid Trailer key %q", k)
} }
keys = append(keys, k) keys = append(keys, k)
} }
@@ -1394,13 +1394,6 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
} }
} }
type badStringError struct {
what string
str string
}
func (e *badStringError) Error() string { return fmt.Sprintf("%s %q", e.what, e.str) }
// requires cc.mu be held. // requires cc.mu be held.
func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) { func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) {
cc.hbuf.Reset() cc.hbuf.Reset()
@@ -1616,6 +1609,7 @@ func (cc *ClientConn) writeHeader(name, value string) {
} }
type resAndError struct { type resAndError struct {
_ incomparable
res *http.Response res *http.Response
err error err error
} }
@@ -1663,6 +1657,7 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. // clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.
type clientConnReadLoop struct { type clientConnReadLoop struct {
_ incomparable
cc *ClientConn cc *ClientConn
closeWhenIdle bool closeWhenIdle bool
} }
@@ -2479,6 +2474,7 @@ func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {
// gzipReader wraps a response body so it can lazily // gzipReader wraps a response body so it can lazily
// call gzip.NewReader on the first call to Read // call gzip.NewReader on the first call to Read
type gzipReader struct { type gzipReader struct {
_ incomparable
body io.ReadCloser // underlying Response.Body body io.ReadCloser // underlying Response.Body
zr *gzip.Reader // lazily-initialized gzip reader zr *gzip.Reader // lazily-initialized gzip reader
zerr error // sticky error zerr error // sticky error

30
vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go сгенерированный поставляемый Обычный файл
Просмотреть файл

@@ -0,0 +1,30 @@
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package unsafeheader contains header declarations for the Go runtime's
// slice and string implementations.
//
// This package allows x/sys to use types equivalent to
// reflect.SliceHeader and reflect.StringHeader without introducing
// a dependency on the (relatively heavy) "reflect" package.
package unsafeheader
import (
"unsafe"
)
// Slice is the runtime representation of a slice.
// It cannot be used safely or portably and its representation may change in a later release.
type Slice struct {
Data unsafe.Pointer
Len int
Cap int
}
// String is the runtime representation of a string.
// It cannot be used safely or portably and its representation may change in a later release.
type String struct {
Data unsafe.Pointer
Len int
}

3
vendor/golang.org/x/sys/unix/mkerrors.sh сгенерированный поставляемый
Просмотреть файл

@@ -187,6 +187,7 @@ struct ltchars {
#include <sys/select.h> #include <sys/select.h>
#include <sys/signalfd.h> #include <sys/signalfd.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/timerfd.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/xattr.h> #include <sys/xattr.h>
#include <linux/bpf.h> #include <linux/bpf.h>
@@ -480,7 +481,7 @@ ccflags="$@"
$2 ~ /^(MS|MNT|UMOUNT)_/ || $2 ~ /^(MS|MNT|UMOUNT)_/ ||
$2 ~ /^NS_GET_/ || $2 ~ /^NS_GET_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ || $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
$2 ~ /^KEXEC_/ || $2 ~ /^KEXEC_/ ||
$2 ~ /^LINUX_REBOOT_CMD_/ || $2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||

21
vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go сгенерированный поставляемый
Просмотреть файл

@@ -6,7 +6,11 @@
package unix package unix
import "unsafe" import (
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
)
//sys closedir(dir uintptr) (err error) //sys closedir(dir uintptr) (err error)
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) //sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
@@ -71,6 +75,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
cnt++ cnt++
continue continue
} }
reclen := int(entry.Reclen) reclen := int(entry.Reclen)
if reclen > len(buf) { if reclen > len(buf) {
// Not enough room. Return for now. // Not enough room. Return for now.
@@ -79,13 +84,15 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// restarting is O(n^2) in the length of the directory. Oh well. // restarting is O(n^2) in the length of the directory. Oh well.
break break
} }
// Copy entry into return buffer. // Copy entry into return buffer.
s := struct { var s []byte
ptr unsafe.Pointer hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
siz int hdr.Data = unsafe.Pointer(&entry)
cap int hdr.Cap = reclen
}{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen} hdr.Len = reclen
copy(buf, *(*[]byte)(unsafe.Pointer(&s))) copy(buf, s)
buf = buf[reclen:] buf = buf[reclen:]
n += reclen n += reclen
cnt++ cnt++

13
vendor/golang.org/x/sys/unix/syscall_linux.go сгенерированный поставляемый
Просмотреть файл

@@ -1633,6 +1633,15 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys DeleteModule(name string, flags int) (err error) //sys DeleteModule(name string, flags int) (err error)
//sys Dup(oldfd int) (fd int, err error) //sys Dup(oldfd int) (fd int, err error)
func Dup2(oldfd, newfd int) error {
// Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
return Dup3(oldfd, newfd, 0)
}
return dup2(oldfd, newfd)
}
//sys Dup3(oldfd int, newfd int, flags int) (err error) //sys Dup3(oldfd int, newfd int, flags int) (err error)
//sysnb EpollCreate1(flag int) (fd int, err error) //sysnb EpollCreate1(flag int) (fd int, err error)
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) //sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
@@ -1757,6 +1766,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys Syncfs(fd int) (err error) //sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) //sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error)
//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) //sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error) //sysnb Times(tms *Tms) (ticks uintptr, err error)
//sysnb Umask(mask int) (oldmask int) //sysnb Umask(mask int) (oldmask int)
@@ -2178,7 +2190,6 @@ func Klogset(typ int, arg int) (err error) {
// TimerGetoverrun // TimerGetoverrun
// TimerGettime // TimerGettime
// TimerSettime // TimerSettime
// Timerfd
// Tkill (obsolete) // Tkill (obsolete)
// Tuxcall // Tuxcall
// Umount2 // Umount2

2
vendor/golang.org/x/sys/unix/syscall_linux_386.go сгенерированный поставляемый
Просмотреть файл

@@ -49,7 +49,7 @@ func Pipe2(p []int, flags int) (err error) {
// 64-bit file system and 32-bit uid calls // 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid). // (386 default is 32-bit file system and 16-bit uid).
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64

2
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go сгенерированный поставляемый
Просмотреть файл

@@ -6,7 +6,7 @@
package unix package unix
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64

2
vendor/golang.org/x/sys/unix/syscall_linux_arm.go сгенерированный поставляемый
Просмотреть файл

@@ -80,7 +80,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// 64-bit file system and 32-bit uid calls // 64-bit file system and 32-bit uid calls
// (16-bit uid calls are not always supported in newer kernels) // (16-bit uid calls are not always supported in newer kernels)
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32

28
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go сгенерированный поставляемый
Просмотреть файл

@@ -25,7 +25,7 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb Getegid() (egid int) //sysnb Getegid() (egid int)
//sysnb Geteuid() (euid int) //sysnb Geteuid() (euid int)
//sysnb Getgid() (gid int) //sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sysnb getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int) //sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error) //sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
@@ -47,7 +47,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sysnb Setregid(rgid int, egid int) (err error) //sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) //sysnb setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error) //sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
@@ -168,6 +168,24 @@ func Pipe2(p []int, flags int) (err error) {
return return
} }
// Getrlimit prefers the prlimit64 system call. See issue 38604.
func Getrlimit(resource int, rlim *Rlimit) error {
err := prlimit(0, resource, nil, rlim)
if err != ENOSYS {
return err
}
return getrlimit(resource, rlim)
}
// Setrlimit prefers the prlimit64 system call. See issue 38604.
func Setrlimit(resource int, rlim *Rlimit) error {
err := prlimit(0, resource, rlim, nil)
if err != ENOSYS {
return err
}
return setrlimit(resource, rlim)
}
func (r *PtraceRegs) PC() uint64 { return r.Pc } func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -192,9 +210,9 @@ func InotifyInit() (fd int, err error) {
return InotifyInit1(0) return InotifyInit1(0)
} }
func Dup2(oldfd int, newfd int) (err error) { // dup2 exists because func Dup3 in syscall_linux.go references
return Dup3(oldfd, newfd, 0) // it in an unreachable path. dup2 isn't available on arm64.
} func dup2(oldfd int, newfd int) error
func Pause() error { func Pause() error {
_, err := ppoll(nil, 0, nil, nil) _, err := ppoll(nil, 0, nil, nil)

2
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go сгенерированный поставляемый
Просмотреть файл

@@ -7,7 +7,7 @@
package unix package unix
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64

2
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go сгенерированный поставляемый
Просмотреть файл

@@ -14,7 +14,7 @@ import (
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64

2
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go сгенерированный поставляемый
Просмотреть файл

@@ -7,7 +7,7 @@
package unix package unix
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64

8
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go сгенерированный поставляемый
Просмотреть файл

@@ -191,10 +191,6 @@ func InotifyInit() (fd int, err error) {
return InotifyInit1(0) return InotifyInit1(0)
} }
func Dup2(oldfd int, newfd int) (err error) {
return Dup3(oldfd, newfd, 0)
}
func Pause() error { func Pause() error {
_, err := ppoll(nil, 0, nil, nil) _, err := ppoll(nil, 0, nil, nil)
return err return err
@@ -228,3 +224,7 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
} }
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
} }
// dup2 exists because func Dup3 in syscall_linux.go references
// it in an unreachable path. dup2 isn't available on arm64.
func dup2(oldfd int, newfd int) error

2
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go сгенерированный поставляемый
Просмотреть файл

@@ -10,7 +10,7 @@ import (
"unsafe" "unsafe"
) )
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error) //sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64

2
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go сгенерированный поставляемый
Просмотреть файл

@@ -8,7 +8,7 @@ package unix
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Dup2(oldfd int, newfd int) (err error) //sys dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error) //sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error) //sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64

17
vendor/golang.org/x/sys/unix/syscall_unix.go сгенерированный поставляемый
Просмотреть файл

@@ -12,6 +12,8 @@ import (
"sync" "sync"
"syscall" "syscall"
"unsafe" "unsafe"
"golang.org/x/sys/internal/unsafeheader"
) )
var ( var (
@@ -113,15 +115,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
return nil, errno return nil, errno
} }
// Slice memory layout // Use unsafe to convert addr into a []byte.
var sl = struct { var b []byte
addr uintptr hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
len int hdr.Data = unsafe.Pointer(addr)
cap int hdr.Cap = length
}{addr, length, length} hdr.Len = length
// Use unsafe to turn sl into a []byte.
b := *(*[]byte)(unsafe.Pointer(&sl))
// Register mapping in m and return it. // Register mapping in m and return it.
p := &b[cap(b)-1] p := &b[cap(b)-1]

2
vendor/golang.org/x/sys/unix/zerrors_linux.go сгенерированный поставляемый
Просмотреть файл

@@ -2165,6 +2165,8 @@ const (
TCP_USER_TIMEOUT = 0x12 TCP_USER_TIMEOUT = 0x12
TCP_WINDOW_CLAMP = 0xa TCP_WINDOW_CLAMP = 0xa
TCP_ZEROCOPY_RECEIVE = 0x23 TCP_ZEROCOPY_RECEIVE = 0x23
TFD_TIMER_ABSTIME = 0x1
TFD_TIMER_CANCEL_ON_SET = 0x2
TIMER_ABSTIME = 0x1 TIMER_ABSTIME = 0x1
TIOCM_DTR = 0x2 TIOCM_DTR = 0x2
TIOCM_LE = 0x1 TIOCM_LE = 0x1

2
vendor/golang.org/x/sys/unix/zerrors_linux_386.go сгенерированный поставляемый
Просмотреть файл

@@ -342,6 +342,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go сгенерированный поставляемый
Просмотреть файл

@@ -343,6 +343,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go сгенерированный поставляемый
Просмотреть файл

@@ -349,6 +349,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go сгенерированный поставляемый
Просмотреть файл

@@ -336,6 +336,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go сгенерированный поставляемый
Просмотреть файл

@@ -339,6 +339,8 @@ const (
TCSETSW = 0x540f TCSETSW = 0x540f
TCSETSW2 = 0x8030542c TCSETSW2 = 0x8030542c
TCXONC = 0x5406 TCXONC = 0x5406
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x80
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x80047478 TIOCCONS = 0x80047478
TIOCEXCL = 0x740d TIOCEXCL = 0x740d

2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go сгенерированный поставляемый
Просмотреть файл

@@ -339,6 +339,8 @@ const (
TCSETSW = 0x540f TCSETSW = 0x540f
TCSETSW2 = 0x8030542c TCSETSW2 = 0x8030542c
TCXONC = 0x5406 TCXONC = 0x5406
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x80
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x80047478 TIOCCONS = 0x80047478
TIOCEXCL = 0x740d TIOCEXCL = 0x740d

2
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go сгенерированный поставляемый
Просмотреть файл

@@ -339,6 +339,8 @@ const (
TCSETSW = 0x540f TCSETSW = 0x540f
TCSETSW2 = 0x8030542c TCSETSW2 = 0x8030542c
TCXONC = 0x5406 TCXONC = 0x5406
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x80
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x80047478 TIOCCONS = 0x80047478
TIOCEXCL = 0x740d TIOCEXCL = 0x740d

2
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go сгенерированный поставляемый
Просмотреть файл

@@ -339,6 +339,8 @@ const (
TCSETSW = 0x540f TCSETSW = 0x540f
TCSETSW2 = 0x8030542c TCSETSW2 = 0x8030542c
TCXONC = 0x5406 TCXONC = 0x5406
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x80
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x80047478 TIOCCONS = 0x80047478
TIOCEXCL = 0x740d TIOCEXCL = 0x740d

2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go сгенерированный поставляемый
Просмотреть файл

@@ -393,6 +393,8 @@ const (
TCSETSF = 0x802c7416 TCSETSF = 0x802c7416
TCSETSW = 0x802c7415 TCSETSW = 0x802c7415
TCXONC = 0x2000741e TCXONC = 0x2000741e
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go сгенерированный поставляемый
Просмотреть файл

@@ -393,6 +393,8 @@ const (
TCSETSF = 0x802c7416 TCSETSF = 0x802c7416
TCSETSW = 0x802c7415 TCSETSW = 0x802c7415
TCXONC = 0x2000741e TCXONC = 0x2000741e
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go сгенерированный поставляемый
Просмотреть файл

@@ -330,6 +330,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go сгенерированный поставляемый
Просмотреть файл

@@ -403,6 +403,8 @@ const (
TCSETXF = 0x5434 TCSETXF = 0x5434
TCSETXW = 0x5435 TCSETXW = 0x5435
TCXONC = 0x540a TCXONC = 0x540a
TFD_CLOEXEC = 0x80000
TFD_NONBLOCK = 0x800
TIOCCBRK = 0x5428 TIOCCBRK = 0x5428
TIOCCONS = 0x541d TIOCCONS = 0x541d
TIOCEXCL = 0x540c TIOCEXCL = 0x540c

2
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go сгенерированный поставляемый
Просмотреть файл

@@ -392,6 +392,8 @@ const (
TCSETSW = 0x8024540a TCSETSW = 0x8024540a
TCSETSW2 = 0x802c540e TCSETSW2 = 0x802c540e
TCXONC = 0x20005406 TCXONC = 0x20005406
TFD_CLOEXEC = 0x400000
TFD_NONBLOCK = 0x4000
TIOCCBRK = 0x2000747a TIOCCBRK = 0x2000747a
TIOCCONS = 0x20007424 TIOCCONS = 0x20007424
TIOCEXCL = 0x2000740d TIOCEXCL = 0x2000740d

31
vendor/golang.org/x/sys/unix/zsyscall_linux.go сгенерированный поставляемый
Просмотреть файл

@@ -1450,6 +1450,37 @@ func Sysinfo(info *Sysinfo_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func TimerfdCreate(clockid int, flags int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
_, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
_, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
if e1 != 0 { if e1 != 0 {

2
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go сгенерированный поставляемый
Просмотреть файл

@@ -55,7 +55,7 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go сгенерированный поставляемый
Просмотреть файл

@@ -234,7 +234,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

4
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go сгенерированный поставляемый
Просмотреть файл

@@ -151,7 +151,7 @@ func Getgid() (gid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(resource int, rlim *Rlimit) (err error) { func getrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)
@@ -307,7 +307,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(resource int, rlim *Rlimit) (err error) { func setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go сгенерированный поставляемый
Просмотреть файл

@@ -45,7 +45,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

2
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go сгенерированный поставляемый
Просмотреть файл

@@ -72,7 +72,7 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(oldfd int, newfd int) (err error) { func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 { if e1 != 0 {
err = errnoErr(e1) err = errnoErr(e1)

5
vendor/golang.org/x/sys/unix/ztypes_linux.go сгенерированный поставляемый
Просмотреть файл

@@ -18,6 +18,11 @@ type (
_C_long_long int64 _C_long_long int64
) )
type ItimerSpec struct {
Interval Timespec
Value Timespec
}
const ( const (
TIME_OK = 0x0 TIME_OK = 0x0
TIME_INS = 0x1 TIME_INS = 0x1

9
vendor/modules.txt поставляемый
Просмотреть файл

@@ -137,7 +137,7 @@ github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/parser github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token github.com/hashicorp/hcl/json/token
# github.com/hashicorp/memberlist v0.1.5 # github.com/hashicorp/memberlist v0.2.2
## explicit ## explicit
github.com/hashicorp/memberlist github.com/hashicorp/memberlist
# github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d # github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d
@@ -413,7 +413,7 @@ go.uber.org/zap/internal/bufferpool
go.uber.org/zap/internal/color go.uber.org/zap/internal/color
go.uber.org/zap/internal/exit go.uber.org/zap/internal/exit
go.uber.org/zap/zapcore go.uber.org/zap/zapcore
# golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc # golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79
## explicit ## explicit
golang.org/x/crypto/acme golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert golang.org/x/crypto/acme/autocert
@@ -449,7 +449,7 @@ golang.org/x/image/webp
# golang.org/x/mod v0.2.0 # golang.org/x/mod v0.2.0
golang.org/x/mod/module golang.org/x/mod/module
golang.org/x/mod/semver golang.org/x/mod/semver
# golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 # golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5
## explicit ## explicit
golang.org/x/net/bpf golang.org/x/net/bpf
golang.org/x/net/context golang.org/x/net/context
@@ -467,9 +467,10 @@ golang.org/x/net/ipv4
golang.org/x/net/ipv6 golang.org/x/net/ipv6
golang.org/x/net/publicsuffix golang.org/x/net/publicsuffix
golang.org/x/net/trace golang.org/x/net/trace
# golang.org/x/sys v0.0.0-20200427175716-29b57079015a # golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3
## explicit ## explicit
golang.org/x/sys/cpu golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix golang.org/x/sys/unix
golang.org/x/sys/windows golang.org/x/sys/windows
# golang.org/x/text v0.3.2 # golang.org/x/text v0.3.2