_map

package
v0.0.0-...-bfc3bc0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService() (server.Service, error)

NewService returns a new Service

Types

type Server

type Server struct {
	api.MapServiceServer
	*service.Server
}

Server is an implementation of MapServiceServer for the map primitive

func (*Server) Clear

func (s *Server) Clear(ctx context.Context, request *api.ClearRequest) (*api.ClearResponse, error)

Clear removes all keys from the map

func (*Server) Close

func (s *Server) Close(ctx context.Context, request *api.CloseRequest) (*api.CloseResponse, error)

Close closes a session

func (*Server) Create

func (s *Server) Create(ctx context.Context, request *api.CreateRequest) (*api.CreateResponse, error)

Create opens a new session

func (*Server) Entries

func (s *Server) Entries(request *api.EntriesRequest, srv api.MapService_EntriesServer) error

Entries lists all entries currently in the map

func (*Server) Events

func (s *Server) Events(request *api.EventRequest, srv api.MapService_EventsServer) error

Events listens for map change events

func (*Server) Exists

func (s *Server) Exists(ctx context.Context, request *api.ExistsRequest) (*api.ExistsResponse, error)

Exists checks whether the map contains a key

func (*Server) Get

func (s *Server) Get(ctx context.Context, request *api.GetRequest) (*api.GetResponse, error)

Get gets the value of a key

func (*Server) Put

func (s *Server) Put(ctx context.Context, request *api.PutRequest) (*api.PutResponse, error)

Put puts a key/value pair into the map

func (*Server) Remove

func (s *Server) Remove(ctx context.Context, request *api.RemoveRequest) (*api.RemoveResponse, error)

Remove removes a key from the map

func (*Server) Replace

func (s *Server) Replace(ctx context.Context, request *api.ReplaceRequest) (*api.ReplaceResponse, error)

Replace replaces a key/value pair in the map

func (*Server) Size

func (s *Server) Size(ctx context.Context, request *api.SizeRequest) (*api.SizeResponse, error)

Size gets the number of entries in the map

type Service

type Service struct {
	server.Service
}

Service is an implementation of map api service.

func (Service) Register

func (s Service) Register(r *grpc.Server)

Register registers the map service

Jump to

Keyboard shortcuts

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