code: func (c *Client) Init() error {
  	stdin, err := ioutil.ReadAll(os.Stdin)
  	if err != nil {
  		return errors.Annotate(err, "failed to read stdin").Err()
  	}
  
  	c.InitBuild = &pb.Build{}
  	if err := proto.Unmarshal(stdin, c.InitBuild); err != nil {
  		return errors.Annotate(err, "failed to parse buildbucket.v2.Build from stdin").Err()
  	}
  
  	if c.Logdog, err = bootstrap.Get(); err != nil {
  		return err
  	}
  
  	buildTimestamp := c.BuildTimestamp
  	if buildTimestamp.IsZero() {
  		buildTimestamp = time.Now()
  	}
  
  	c.buildStream, err = c.Logdog.Client.NewStream(streamproto.Flags{
  		Name:        streamproto.StreamNameFlag(BuildStreamName),
  		Type:        streamproto.StreamType(logpb.StreamType_DATAGRAM),
  		ContentType: protoutil.BuildMediaType,
  		Timestamp:   clockflag.Time(buildTimestamp),
  	})
  	return err
  }
docs: // Init initializes the client. Populates c.InitBuild and c.ButlerClient.