You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
268 B

  1. package filer
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/util"
  4. )
  5. const (
  6. HARD_LINK_MARKER = '\x01'
  7. )
  8. type HardLinkId []byte // 16 bytes + 1 marker byte
  9. func NewHardLinkId() HardLinkId {
  10. bytes := append(util.RandomBytes(16), HARD_LINK_MARKER)
  11. return bytes
  12. }