Movatterモバイル変換


[0]ホーム

URL:


mem

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:7Imported by:23

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package mem provides an in-memory ipn.StateStore implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcNew

New returns a new Store.

Types

typeStore

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

Store is an ipn.StateStore that keeps state in memory only.

func (*Store)ExportToJSON

func (s *Store) ExportToJSON() ([]byte,error)

ExportToJSON exports the content of the cache toJSON formatted []byte.

func (*Store)LoadFromJSON

func (s *Store) LoadFromJSON(data []byte)error

LoadFromJSON attempts to unmarshal json content into thein-memory cache.

func (*Store)LoadFromMapadded inv1.78.0

func (s *Store) LoadFromMap(m map[string][]byte)

LoadFromMap loads the in-memory cache from the provided map.Any existing content is cleared, and the provided map iscopied into the cache.

func (*Store)ReadState

func (s *Store) ReadState(idipn.StateKey) ([]byte,error)

ReadState implements the StateStore interface.It returns ipn.ErrStateNotExist if the state does not exist.

func (*Store)String

func (s *Store) String()string

func (*Store)WriteState

func (s *Store) WriteState(idipn.StateKey, bs []byte)error

WriteState implements the StateStore interface.It never returns an error.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp