Documentation ¶
Index ¶
- Variables
- type Gateway
- type Grpc
- type GrpcSrv
- func (s *GrpcSrv) Begin(ctx context.Context, empty *emptypb.Empty) (*proto.BeginResp, error)
- func (s *GrpcSrv) Commit(ctx context.Context, req *proto.CommitReq) (*emptypb.Empty, error)
- func (s *GrpcSrv) Endpoint() *url.URL
- func (s *GrpcSrv) GetState(ctx context.Context, req *proto.GetStateReq) (*proto.GetStateResp, error)
- func (s *GrpcSrv) Handler(certFile, name string) httpsrv.Handler
- func (s *GrpcSrv) Register(ctx context.Context, req *proto.RegisterReq) (*emptypb.Empty, error)
- func (s *GrpcSrv) Rollback(ctx context.Context, req *proto.RollBckReq) (*emptypb.Empty, error)
- func (s *GrpcSrv) Run(ctx context.Context) error
- func (s *GrpcSrv) Start(ctx context.Context, req *proto.StartReq) (*emptypb.Empty, error)
- func (s *GrpcSrv) Stop(ctx context.Context) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrGIdNotExist = errors.New("gid is not exist")
)
Functions ¶
This section is empty.
Types ¶
type Grpc ¶
type Grpc struct { ListenOn string `yaml:"listenOn"` KeyFile string `yaml:"keyFile"` CertFile string `yaml:"certFile"` Gateway Gateway `yaml:"gateway"` }
func (*Grpc) OpenGateway ¶
type GrpcSrv ¶
type GrpcSrv struct { proto.UnimplementedEasyCarServer // contains filtered or unexported fields }
func New ¶
func New(settings Grpc, coordinator *coordinator.Coordinator) (*GrpcSrv, error)
func (*GrpcSrv) GetState ¶
func (s *GrpcSrv) GetState(ctx context.Context, req *proto.GetStateReq) (*proto.GetStateResp, error)
Click to show internal directories.
Click to hide internal directories.