You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: meta.go
    path of file: ./repos/openreplay/backend/internal/sink/sessionwriter
    
    the code of the file until where you have to start completion: package sessionwriter

import (
	"math"
	"sync"
	"time"
)

type Meta struct {
	limit int
	lock  *sync.Mutex
	meta  map[uint64]int64
}

func NewMeta(limit int) *Meta {
	return &Meta{
		limit: limit,
		lock:  &sync.Mutex{},
		meta:  make(map[uint64]int64, limit),
	}
}


    
func (m *Meta) GetExtra() uint64 {
	m.lock.Lock()
	defer m.lock.Unlock()
	if len(m.meta) >= m.limit {
		var extraSessID uint64
		var minTimestamp int64 = math.MaxInt64
		for sessID, timestamp := range m.meta {
			if timestamp < minTimestamp {
				extraSessID = sessID
				minTimestamp = timestamp
			}
		}
		return extraSessID
	}
	return 0
}