Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewMemStore (0.11 sec)

  1. pkg/kubelet/checkpointmanager/testing/util.go

    	"sync"
    )
    
    // MemStore is an implementation of CheckpointStore interface which stores checkpoint in memory.
    type MemStore struct {
    	mem map[string][]byte
    	sync.Mutex
    }
    
    // NewMemStore returns an instance of MemStore
    func NewMemStore() *MemStore {
    	return &MemStore{mem: make(map[string][]byte)}
    }
    
    // Write writes the data to the store
    func (mstore *MemStore) Write(key string, data []byte) error {
    	mstore.Lock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 16 05:30:20 UTC 2018
    - 1.7K bytes
    - Viewed (0)
  2. pkg/kubelet/checkpointmanager/checkpoint_manager_test.go

    }
    
    func newTestCheckpointManager() CheckpointManager {
    	return &impl{store: testStore}
    }
    
    func TestCheckpointManager(t *testing.T) {
    	var err error
    	testStore = utilstore.NewMemStore()
    	manager := newTestCheckpointManager()
    	port80 := int32(80)
    	port443 := int32(443)
    	proto := protocol("tcp")
    	ip1234 := "1.2.3.4"
    
    	portMappings := []*PortMapping{
    		{
    			&proto,
    			&port80,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 12 06:41:04 UTC 2018
    - 6.6K bytes
    - Viewed (0)
Back to top