grpc

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is frames gRPC client

func NewClient

func NewClient(address string, session *frames.Session, logger logger.Logger) (*Client, error)

NewClient returns a new gRPC client

func (*Client) Create

func (c *Client) Create(request *pb.CreateRequest) error

Create creates a table

func (*Client) Delete

func (c *Client) Delete(request *pb.DeleteRequest) error

Delete deletes data or table

func (*Client) Exec

func (c *Client) Exec(request *pb.ExecRequest) (frames.Frame, error)

Exec executes a command on the backend

func (*Client) Read

func (c *Client) Read(request *pb.ReadRequest) (frames.FrameIterator, error)

func (*Client) Write

func (c *Client) Write(request *frames.WriteRequest) (frames.FrameAppender, error)

type Server

type Server struct {
	frames.ServerBase
	// contains filtered or unexported fields
}

Server is a frames gRPC server

func NewServer

func NewServer(config *frames.Config, addr string, logger logger.Logger, historyServer *utils.HistoryServer, version string) (*Server, error)

NewServer returns a new gRPC server

func (*Server) Create

func (s *Server) Create(ctx context.Context, req *pb.CreateRequest) (*pb.CreateResponse, error)

Create creates a table

func (*Server) Delete

func (s *Server) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResponse, error)

Delete deletes a table

func (*Server) Exec

func (s *Server) Exec(ctx context.Context, req *pb.ExecRequest) (*pb.ExecResponse, error)

Exec executes a command

func (*Server) History added in v0.7.6

func (s *Server) History(request *pb.HistoryRequest, stream pb.Frames_HistoryServer) error

History returns framesd history logs

func (*Server) Read

func (s *Server) Read(request *pb.ReadRequest, stream pb.Frames_ReadServer) error

func (*Server) Start

func (s *Server) Start() error

Start starts the server

func (*Server) Version added in v0.8.6

func (s *Server) Version(ctx context.Context, _ *pb.VersionRequest) (*pb.VersionResponse, error)

Version return server version

func (*Server) Write

func (s *Server) Write(stream pb.Frames_WriteServer) error

Write write data to table

Jump to

Keyboard shortcuts

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