handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet contains providers for creating instances of the biz struct.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	v1.UnimplementedCacheServerServer
	// contains filtered or unexported fields
}

Handler provides gRPC methods to handle cache operations.

func NewHandler

func NewHandler(biz biz.IBiz) *Handler

NewCacheServerHandler creates and returns a new instance of Handler.

func (*Handler) Del

func (h *Handler) Del(ctx context.Context, rq *v1.DelRequest) (*emptypb.Empty, error)

Del removes a key from the cache by namespace.

func (*Handler) DelSecret

func (h *Handler) DelSecret(ctx context.Context, rq *v1.DelSecretRequest) (*emptypb.Empty, error)

DelSecret removes a secret from the system.

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, rq *v1.GetRequest) (*v1.GetResponse, error)

Get retrieves a key's value from the cache by namespace.

func (*Handler) GetSecret

func (h *Handler) GetSecret(ctx context.Context, rq *v1.GetSecretRequest) (*v1.GetSecretResponse, error)

GetSecret retrieves a secret from the system.

func (*Handler) Set

func (h *Handler) Set(ctx context.Context, rq *v1.SetRequest) (*emptypb.Empty, error)

Set stores a key-value pair in the cache with an optional expiration time.

func (*Handler) SetSecret

func (h *Handler) SetSecret(ctx context.Context, rq *v1.SetSecretRequest) (*emptypb.Empty, error)

SetSecret stores a secret in the system or updates an existing one.

Jump to

Keyboard shortcuts

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