grpc

package
v0.0.0-...-97b9ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package grpc implements transaction protocols using gRPC

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManagerClient

type ManagerClient struct {
	// contains filtered or unexported fields
}

ManagerClient implemets tcommit.Manager interface. It is assumed to be a part of the resource manager for remote procedure calls.

func NewManagerClient

func NewManagerClient(grpcClient pb.ManagerServiceClient) *ManagerClient

NewManagerClient with a given gRPC client.

func (*ManagerClient) Begin

func (r *ManagerClient) Begin(ctx context.Context, votes tcommit.Votes,
	meta tcommit.Meta) error

Begin transaction RPC

func (*ManagerClient) Finish

func (r *ManagerClient) Finish(ctx context.Context, nodeID tcommit.NodeID,
	meta tcommit.Meta) error

Finish transaction RPC

type ResourceClient

type ResourceClient struct {
	// contains filtered or unexported fields
}

ResourceClient implements tcommit.Resource interface. It is assumed to be a part of the transaction manager for remote procedure calls.

func NewResourceClient

func NewResourceClient(grpcClient pb.ResourceServiceClient) *ResourceClient

NewResourceClient with a given gRPC client

func (*ResourceClient) Abort

func (r *ResourceClient) Abort(ctx context.Context) error

Abort transaction RPC

func (*ResourceClient) Commit

func (r *ResourceClient) Commit(ctx context.Context) error

Commit transaction RPC

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL