nativemodel_unix.go 953 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2014 Jakob Borg and other contributors. All rights reserved.
  2. // Use of this source code is governed by an MIT-style license that can be
  3. // found in the LICENSE file.
  4. // +build !windows,!darwin
  5. package protocol
  6. // Normal Unixes uses NFC and slashes, which is the wire format.
  7. type nativeModel struct {
  8. next Model
  9. }
  10. func (m nativeModel) Index(nodeID NodeID, repo string, files []FileInfo) {
  11. m.next.Index(nodeID, repo, files)
  12. }
  13. func (m nativeModel) IndexUpdate(nodeID NodeID, repo string, files []FileInfo) {
  14. m.next.IndexUpdate(nodeID, repo, files)
  15. }
  16. func (m nativeModel) Request(nodeID NodeID, repo string, name string, offset int64, size int) ([]byte, error) {
  17. return m.next.Request(nodeID, repo, name, offset, size)
  18. }
  19. func (m nativeModel) ClusterConfig(nodeID NodeID, config ClusterConfigMessage) {
  20. m.next.ClusterConfig(nodeID, config)
  21. }
  22. func (m nativeModel) Close(nodeID NodeID, err error) {
  23. m.next.Close(nodeID, err)
  24. }