Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrEmptyName = errors.ConstError("name cannot be an empty string") ErrNameWithSlash = errors.ConstError("name cannot contain slashes: '/'") ErrNameWithNullByte = errors.ConstError("name cannot contain null bytes") ErrNameWithSelfReference = errors.ConstError("name cannot be a self reference: '.'") ErrNameWithParentReference = errors.ConstError("name cannot be a parent reference: '..'") ErrNamesAreNotSorted = errors.ConstError("names must be lexicographically sorted") )
Variables ¶
View Source
var ( DiskBasedStreamConfig = nats.StreamConfig{ Name: "directory_store", Subjects: []string{ subject.WithPrefix("STORE.DIRECTORY.*"), }, Replicas: 1, Discard: nats.DiscardOld, MaxMsgsPerSubject: 1, Storage: nats.FileStorage, AllowRollup: true, AllowDirect: true, Compression: nats.S2Compression, RePublish: &nats.RePublish{ Source: subject.WithPrefix("STORE.DIRECTORY.*"), Destination: subject.WithPrefix("CACHE.DIRECTORY.{{wildcard(1)}}"), }, } MemoryBasedStreamConfig = nats.StreamConfig{ Name: "directory_cache", Subjects: []string{ subject.WithPrefix("CACHE.DIRECTORY.*"), }, Replicas: 1, Discard: nats.DiscardOld, MaxBytes: 1024 * 1024 * 128, MaxMsgsPerSubject: 1, Storage: nats.MemoryStorage, AllowRollup: true, AllowDirect: true, } )
Functions ¶
func NewDirectoryStore ¶
Types ¶
type Server ¶
type Server struct { capb.UnimplementedDirectoryServiceServer // contains filtered or unexported fields }
func (*Server) Get ¶
func (s *Server) Get(req *capb.GetDirectoryRequest, server capb.DirectoryService_GetServer) error
func (*Server) GetByDigest ¶
Click to show internal directories.
Click to hide internal directories.