mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
3
beacon-chain/internal/beacon_service_mock.go
generated
3
beacon-chain/internal/beacon_service_mock.go
generated
@@ -6,12 +6,13 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
types "github.com/gogo/protobuf/types"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
v10 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
metadata "google.golang.org/grpc/metadata"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockBeaconServiceServer is a mock of BeaconServiceServer interface
|
||||
|
||||
3
beacon-chain/internal/validator_service_mock.go
generated
3
beacon-chain/internal/validator_service_mock.go
generated
@@ -6,10 +6,11 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
metadata "google.golang.org/grpc/metadata"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockValidatorServiceServer is a mock of ValidatorServiceServer interface
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
joonix "github.com/joonix/log"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/x-cray/logrus-prefixed-formatter"
|
||||
prefixed "github.com/x-cray/logrus-prefixed-formatter"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/node"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/utils"
|
||||
|
||||
5
proto/beacon/p2p/v1/messages.pb.go
generated
5
proto/beacon/p2p/v1/messages.pb.go
generated
@@ -5,10 +5,11 @@ package ethereum_beacon_p2p_v1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
types "github.com/gogo/protobuf/types"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
types "github.com/gogo/protobuf/types"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
5
proto/beacon/p2p/v1/types.pb.go
generated
5
proto/beacon/p2p/v1/types.pb.go
generated
@@ -5,10 +5,11 @@ package ethereum_beacon_p2p_v1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/prysmaticlabs/prysm/proto/common"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/prysmaticlabs/prysm/proto/common"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
5
proto/beacon/rpc/v1/services.pb.go
generated
5
proto/beacon/rpc/v1/services.pb.go
generated
@@ -7,14 +7,15 @@ import (
|
||||
context "context"
|
||||
encoding_binary "encoding/binary"
|
||||
fmt "fmt"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
types "github.com/gogo/protobuf/types"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
io "io"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
1
proto/beacon/rpc/v1_gateway/BUILD.bazel
Normal file
1
proto/beacon/rpc/v1_gateway/BUILD.bazel
Normal file
@@ -0,0 +1 @@
|
||||
# gazelle:ignore
|
||||
2554
proto/beacon/rpc/v1_gateway/services.pb.go
generated
Executable file
2554
proto/beacon/rpc/v1_gateway/services.pb.go
generated
Executable file
File diff suppressed because it is too large
Load Diff
108
proto/beacon/rpc/v1_gateway/services.pb.gw.go
Executable file
108
proto/beacon/rpc/v1_gateway/services.pb.gw.go
Executable file
@@ -0,0 +1,108 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: proto/beacon/rpc/v1/services.proto
|
||||
|
||||
/*
|
||||
Package ethereum_beacon_rpc_v1 is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package ethereum_beacon_rpc_v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
|
||||
func request_BeaconService_BlockTree_0(ctx context.Context, marshaler runtime.Marshaler, client BeaconServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.BlockTree(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterBeaconServiceHandlerFromEndpoint is same as RegisterBeaconServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterBeaconServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterBeaconServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterBeaconServiceHandler registers the http handlers for service BeaconService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterBeaconServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterBeaconServiceHandlerClient(ctx, mux, NewBeaconServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterBeaconServiceHandlerClient registers the http handlers for service BeaconService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BeaconServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BeaconServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "BeaconServiceClient" to call the correct interceptors.
|
||||
func RegisterBeaconServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BeaconServiceClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_BeaconService_BlockTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BeaconService_BlockTree_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BeaconService_BlockTree_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_BeaconService_BlockTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "beacon", "blocktree"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_BeaconService_BlockTree_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
3
proto/sharding/p2p/v1/messages.pb.go
generated
3
proto/sharding/p2p/v1/messages.pb.go
generated
@@ -5,9 +5,10 @@ package ethereum_sharding_p2p_v1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
||||
3
validator/internal/attester_service_mock.go
generated
3
validator/internal/attester_service_mock.go
generated
@@ -6,11 +6,12 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
v10 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
grpc "google.golang.org/grpc"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockAttesterServiceClient is a mock of AttesterServiceClient interface
|
||||
|
||||
3
validator/internal/beacon_service_mock.go
generated
3
validator/internal/beacon_service_mock.go
generated
@@ -6,13 +6,14 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
types "github.com/gogo/protobuf/types"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
v10 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
grpc "google.golang.org/grpc"
|
||||
metadata "google.golang.org/grpc/metadata"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockBeaconServiceClient is a mock of BeaconServiceClient interface
|
||||
|
||||
3
validator/internal/proposer_service_mock.go
generated
3
validator/internal/proposer_service_mock.go
generated
@@ -6,11 +6,12 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
||||
v10 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
grpc "google.golang.org/grpc"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockProposerServiceClient is a mock of ProposerServiceClient interface
|
||||
|
||||
3
validator/internal/validator_service_mock.go
generated
3
validator/internal/validator_service_mock.go
generated
@@ -6,11 +6,12 @@ package internal
|
||||
|
||||
import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
v1 "github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1"
|
||||
grpc "google.golang.org/grpc"
|
||||
metadata "google.golang.org/grpc/metadata"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
// MockValidatorServiceClient is a mock of ValidatorServiceClient interface
|
||||
|
||||
Reference in New Issue
Block a user